[Nagiosplug-help] check_arping dependencies

Tntteam tntteam at free.fr
Mon Jan 10 10:19:13 CET 2011


Hi,

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).

check_arping_perso.sh :



#!/bin/bash

STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
TEMP_OUTPUT=/tmp/check_arpping_$1
CHECK_OK="*,   0% unanswered*"
CHECK_NOT_OK="*, 100% unanswered*"


/usr/sbin/arping -c 3 -w 2000000 $1 > $TEMP_OUTPUT

if [[ `/usr/bin/tail -n 1 $TEMP_OUTPUT` == $CHECK_OK ]]
then
        echo OK : `tail -n 1 $TEMP_OUTPUT`
        exit $STATE_OK;
else
        if [[ `/usr/bin/tail -n 1 $TEMP_OUTPUT` == $CHECK_NOT_OK ]]
        then
                echo NOT OK : `tail -n 1 $TEMP_OUTPUT`
                exit $STATE_CRITICAL;
        fi
fi
echo WARNING : `/usr/bin/tail -n 1 $TEMP_OUTPUT`
exit $STATE_WARNING;



2011/1/10 Tntteam <tntteam at free.fr>

> Hi,
> I already tried this :
>
> *************
>
>
> So I search on internet for Arping.pm, found one here :
>
> http://kobesearch.cpan.org/htdocs/Net-Arping/Net/Arping.pm.html
>
> I put it in /usr/lib/perl5/Net
>
> But still not working :
>
> root at supervision:/usr/lib/
> perl5/Net# /usr/local/nagios/libexec/check_arping.pl  -H 127.0.0.7 -I eth0
> -T 10
> 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/check_arping.plline 34
> Compilation failed in require at /usr/local/nagios/libexec/check_arping.plline 34.
> BEGIN failed--compilation aborted at /usr/local/nagios/libexec/
> check_arping.pl line 34.
>
> **************
>
> Any idea ?
>
> Thanks
>
>
> 2011/1/10 Nigel Prentice <nigelpr at paradise.net.nz>
>
>  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.
>> When you have Arping.pm present on your system, add the following line
>> into your check_arping.pl (near the beginning and before line 34!):
>> use lib "path-to-your-Arping.pm-location";
>> where path-to-your-Arping.pm-location is a complete pathname e.g.
>> /usr/local/nagios/libexec/Net (remember the quotes around it)
>> 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.
>>
>> ----- Original Message -----
>> *From:* Tntteam <tntteam at free.fr>
>> *To:* nagiosplug-help at lists.sourceforge.net
>> *Sent:* Saturday, 8 January 2011 2:22 a.m.
>> *Subject:* [Nagiosplug-help] check_arping dependencies
>>
>>
>> Hi,
>>
>> First, thanks for the great work you do guys.
>>
>>
>> I'm trying to use check_arping plugin but with no success.
>>
>> I tried install these packages :
>>
>> libnet-pcap-perl libnet-libdnet-perl libnet-arp-perl arping
>>
>> But still not working :
>>
>> root at supervision:/usr/lib/perl5/Net# /usr/local/nagios/libexec/
>> check_arping.pl  -H 127.0.0.1 -I eth0 -T 10
>> 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/check_arping.pl line 34.
>> BEGIN failed--compilation aborted at /usr/local/nagios/libexec/
>> check_arping.pl line 34.
>>
>>
>> So I search on internet for Arping.pm, found one here :
>>
>> http://kobesearch.cpan.org/htdocs/Net-Arping/Net/Arping.pm.html
>>
>> I put it in /usr/lib/perl5/Net
>>
>> But still not working :
>>
>> root at supervision:/usr/lib/perl5/Net# /usr/local/nagios/libexec/
>> check_arping.pl  -H 127.0.0.7 -I eth0 -T 10
>> 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/check_arping.plline 34
>> Compilation failed in require at /usr/local/nagios/libexec/
>> check_arping.pl line 34.
>> BEGIN failed--compilation aborted at /usr/local/nagios/libexec/
>> check_arping.pl line 34.
>>
>>
>>
>>
>> I don't understand something, sorry for my noob question, but can you help
>> me make it working ?
>>
>>
>> Big htanks
>>
>>  ------------------------------
>>
>>
>> ------------------------------------------------------------------------------
>> Gaining the trust of online customers is vital for the success of any
>> company
>> that requires sensitive data to be transmitted over the Web.   Learn how
>> to
>> best implement a security strategy that keeps consumers' information
>> secure
>> and instills the confidence they need to proceed with transactions.
>> http://p.sf.net/sfu/oracle-sfdevnl
>>
>> ------------------------------
>>
>> _______________________________________________
>> Nagiosplug-help mailing list
>> Nagiosplug-help at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
>> ::: Please include plugins version (-v) and OS when reporting any issue.
>> ::: Messages without supporting info will risk being sent to /dev/null
>>
>> ------------------------------
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 9.0.872 / Virus Database: 271.1.1/3365 - Release Date: 01/07/11
>> 20:34:00
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Gaining the trust of online customers is vital for the success of any
>> company
>> that requires sensitive data to be transmitted over the Web.   Learn how
>> to
>> best implement a security strategy that keeps consumers' information
>> secure
>> and instills the confidence they need to proceed with transactions.
>> http://p.sf.net/sfu/oracle-sfdevnl
>> _______________________________________________
>> Nagiosplug-help mailing list
>> Nagiosplug-help at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
>> ::: Please include plugins version (-v) and OS when reporting any issue.
>> ::: Messages without supporting info will risk being sent to /dev/null
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20110110/0b4b5e02/attachment.html>


More information about the Help mailing list