Hi,<br><br>Because I could not achieve to make this plugin work, I rewrite one in bash which is easier for me. Here is it, which is a very simple thing that require only the arping packet + setuid on arping binary (which is not very secure, but I think it's a limitation on arping binary).<br>
<br>check_arping_perso.sh :<br><br><br><br>#!/bin/bash<br><br>STATE_OK=0<br>STATE_WARNING=1<br>STATE_CRITICAL=2<br>STATE_UNKNOWN=3<br>TEMP_OUTPUT=/tmp/check_arpping_$1<br>CHECK_OK="*, 0% unanswered*"<br>CHECK_NOT_OK="*, 100% unanswered*"<br>
<br><br>/usr/sbin/arping -c 3 -w 2000000 $1 > $TEMP_OUTPUT<br><br>if [[ `/usr/bin/tail -n 1 $TEMP_OUTPUT` == $CHECK_OK ]]<br>then<br> echo OK : `tail -n 1 $TEMP_OUTPUT`<br> exit $STATE_OK;<br>else<br> if [[ `/usr/bin/tail -n 1 $TEMP_OUTPUT` == $CHECK_NOT_OK ]]<br>
then<br> echo NOT OK : `tail -n 1 $TEMP_OUTPUT`<br> exit $STATE_CRITICAL;<br> fi<br>fi<br>echo WARNING : `/usr/bin/tail -n 1 $TEMP_OUTPUT`<br>exit $STATE_WARNING;<br><br><br><br>
<div class="gmail_quote">2011/1/10 Tntteam <span dir="ltr"><<a href="mailto:tntteam@free.fr">tntteam@free.fr</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>I already tried this :<br><br>*************<div class="im"><br><br>So I search on internet for Arping.pm, found one here :<br><br><a href="http://kobesearch.cpan.org/htdocs/Net-Arping/Net/Arping.pm.html" target="_blank">http://kobesearch.cpan.org/htdocs/Net-Arping/Net/Arping.pm.html</a><br>
<br>I put it in /usr/lib/perl5/Net<br><br>But still not working :<br><br>root@supervision:/usr/lib/</div><div class="gmail_quote"><div class="im">perl5/Net# /usr/local/nagios/libexec/<a href="http://check_arping.pl/" target="_blank">check_arping.pl</a> -H 127.0.0.7 -I eth0 -T 10<br>
Can't locate loadable object for module Net::Arping in @INC (@INC
contains: /usr/lib/nagios/plugins /usr/local/nagios/libexec /etc/perl
/usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl .) at /usr/local/nagios/libexec/<a href="http://check_arping.pl/" target="_blank">check_arping.pl</a> line 34<br>
Compilation failed in require at /usr/local/nagios/libexec/<a href="http://check_arping.pl/" target="_blank">check_arping.pl</a> line 34.<br>BEGIN failed--compilation aborted at /usr/local/nagios/libexec/<a href="http://check_arping.pl/" target="_blank">check_arping.pl</a> line 34.<br>
<br></div>**************<br><br>Any idea ?<br><br>Thanks<br></div><br><br><div class="gmail_quote">2011/1/10 Nigel Prentice <span dir="ltr"><<a href="mailto:nigelpr@paradise.net.nz" target="_blank">nigelpr@paradise.net.nz</a>></span><div>
<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font size="2">This looks like a PERL problem to me. The PERL interpreter is
telling us it can't locate Arping.pm in the standard library seach paths, and it
goes ahead to list those for us.</font></div>
<div><font size="2">When you have Arping.pm present on your system, add the
following line into your <a href="http://check_arping.pl" target="_blank">check_arping.pl</a> (near the beginning and before line
34!):</font></div>
<div><font size="2">use lib "path-to-your-Arping.pm-location";</font></div>
<div><font size="2">where path-to-your-Arping.pm-location is a complete pathname
e.g. /usr/local/nagios/libexec/Net (remember the quotes around it)</font></div>
<div><font size="2">So this is a missing PERL library, not a missing unix
system library. There are at least two other ways to fix this PERL search path,
but I find this method best.</font></div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-left: 5px; padding-right: 0px; margin-left: 5px; margin-right: 0px;"><div><div></div><div>
<div style="font: 10pt arial;">----- Original Message ----- </div>
<div style="font: 10pt arial; background: none repeat scroll 0% 0% rgb(228, 228, 228);"><b>From:</b>
<a title="tntteam@free.fr" href="mailto:tntteam@free.fr" target="_blank">Tntteam</a> </div>
<div style="font: 10pt arial;"><b>To:</b> <a title="nagiosplug-help@lists.sourceforge.net" href="mailto:nagiosplug-help@lists.sourceforge.net" target="_blank">nagiosplug-help@lists.sourceforge.net</a>
</div>
<div style="font: 10pt arial;"><b>Sent:</b> Saturday, 8 January 2011 2:22
a.m.</div>
<div style="font: 10pt arial;"><b>Subject:</b> [Nagiosplug-help] check_arping
dependencies</div>
<div><br></div><br>
<div class="gmail_quote">Hi,<br><br>First, thanks for the great work you do
guys.<br><br><br>I'm trying to use check_arping plugin but with no
success.<br><br>I tried install these packages :<br><br>libnet-pcap-perl
libnet-libdnet-perl libnet-arp-perl arping<br><br>But still not working :
<br><br><a href="mailto:root@supervision:/usr/lib/perl5/Net" target="_blank">root@supervision:/usr/lib/perl5/Net</a>#
/usr/local/nagios/libexec/<a href="http://check_arping.pl" target="_blank">check_arping.pl</a> -H 127.0.0.1 -I eth0 -T 10<br>Can't
locate Net/Arping.pm in @INC (@INC contains: /usr/lib/nagios/plugins
/usr/local/nagios/libexec /etc/perl /usr/local/lib/perl/5.10.1
/usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at
/usr/local/nagios/libexec/<a href="http://check_arping.pl" target="_blank">check_arping.pl</a> line 34.<br>BEGIN failed--compilation
aborted at /usr/local/nagios/libexec/<a href="http://check_arping.pl" target="_blank">check_arping.pl</a> line 34.<br><br><br>So I search on internet
for Arping.pm, found one here :<br><br><a href="http://kobesearch.cpan.org/htdocs/Net-Arping/Net/Arping.pm.html" target="_blank">http://kobesearch.cpan.org/htdocs/Net-Arping/Net/Arping.pm.html</a><br><br>I
put it in /usr/lib/perl5/Net<br><br>But still not working
:<br><br>root@supervision:/usr/lib/perl5/Net# /usr/local/nagios/libexec/<a href="http://check_arping.pl" target="_blank">check_arping.pl</a> -H
127.0.0.7 -I eth0 -T 10<br>Can't locate loadable object for module Net::Arping
in @INC (@INC contains: /usr/lib/nagios/plugins /usr/local/nagios/libexec
/etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl .) at /usr/local/nagios/libexec/<a href="http://check_arping.pl" target="_blank">check_arping.pl</a> line
34<br>Compilation failed in require at /usr/local/nagios/libexec/<a href="http://check_arping.pl" target="_blank">check_arping.pl</a> line
34.<br>BEGIN failed--compilation aborted at /usr/local/nagios/libexec/<a href="http://check_arping.pl" target="_blank">check_arping.pl</a> line
34.<br><br><br><br><br>I don't understand something, sorry for my noob
question, but can you help me make it working ?<br><br><br>Big
htanks<br></div><br>
</div></div><p></p><div><div></div><div>
<hr>
<p></p>------------------------------------------------------------------------------<br>Gaining
the trust of online customers is vital for the success of any company<br>that
requires sensitive data to be transmitted over the Web. Learn how
to <br>best implement a security strategy that keeps consumers' information
secure <br>and instills the confidence they need to proceed with
transactions.<br><a href="http://p.sf.net/sfu/oracle-sfdevnl" target="_blank">http://p.sf.net/sfu/oracle-sfdevnl</a>
</div></div><p></p><div><div></div><div>
<hr>
<p></p>_______________________________________________<br>Nagiosplug-help
mailing
list<br><a href="mailto:Nagiosplug-help@lists.sourceforge.net" target="_blank">Nagiosplug-help@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-help" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagiosplug-help</a><br>
:::
Please include plugins version (-v) and OS when reporting any issue. <br>:::
Messages without supporting info will risk being sent to /dev/null<br>
</div></div><p>
</p><hr>
<p></p><br>No virus found in this incoming message.<br>Checked by AVG -
<a href="http://www.avg.com" target="_blank">www.avg.com</a> <br>Version: 9.0.872 / Virus Database: 271.1.1/3365 - Release
Date: 01/07/11 20:34:00<br></blockquote></div>
<br>------------------------------------------------------------------------------<br>
Gaining the trust of online customers is vital for the success of any company<br>
that requires sensitive data to be transmitted over the Web. Learn how to<br>
best implement a security strategy that keeps consumers' information secure<br>
and instills the confidence they need to proceed with transactions.<br>
<a href="http://p.sf.net/sfu/oracle-sfdevnl" target="_blank">http://p.sf.net/sfu/oracle-sfdevnl</a> <br>_______________________________________________<br>
Nagiosplug-help mailing list<br>
<a href="mailto:Nagiosplug-help@lists.sourceforge.net" target="_blank">Nagiosplug-help@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-help" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagiosplug-help</a><br>
::: Please include plugins version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
<br></blockquote></div></div></div><br>
</blockquote></div><br>