Page 1 of 1

Check_sip.pl

Posted: Sat Feb 23, 2019 2:38 pm
by Rook
Evening,

My last hurdle to complete this nagios project.

Ive downloaded the Check_sip.pl file, put it in the libexec map, and gave it 755 rights to execute.

perl -v shows V5.10.1, also installed Nagios::Plugin; that is being used by the script.

But it still giving me this error message when i test it from the commandline:

Code: Select all

Can't locate Nagios/Plugin.pm in @INC (you may need to install the Nagios::Plugin module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at ./check_sip.pl line 30.
BEGIN failed--compilation aborted at ./check_sip.pl line 30.
Line 30 has something to do with " use Nagios::Plugin; ", but that is installed aswell.

Any thoughts?

Thanks in advance.

Re: Check_sip.pl

Posted: Mon Feb 25, 2019 1:59 pm
by scottwilkerson
This plugin references the depricated Nagios::Plugin package

run the following, changing the path to Check_sip.pl

Code: Select all

sed -i -e 's/Nagios::Plugin/Nagios::Monitoring::Plugin/g' /path/to/Check_sip.pl
If you do not have the plugin yet

Code: Select all

cd /tmp
wget https://cpan.metacpan.org/authors/id/N/NA/NAGIOS/Nagios-Monitoring-Plugin-0.51.tar.gz
tar xzf Nagios-Monitoring-Plugin-0.51.tar.gz
cd Nagios-Monitoring-Plugin-0.51
perl Makefile.PL
make
make test
make install

Re: Check_sip.pl

Posted: Mon Feb 25, 2019 3:16 pm
by Rook
Hello Scott,

Thanks for reaching out again.

Relocated the path, but that did nothing.

Also redownloaded the plugin, installed successfully and tried it again, but with still the same error as result.

Any other thoughts to test?

Re: Check_sip.pl

Posted: Mon Feb 25, 2019 3:19 pm
by scottwilkerson
Did you run this?

Code: Select all

sed -i -e 's/Nagios::Plugin/Nagios::Monitoring::Plugin/g' /path/to/Check_sip.pl
and this?

Code: Select all

cd /tmp
wget https://cpan.metacpan.org/authors/id/N/NA/NAGIOS/Nagios-Monitoring-Plugin-0.51.tar.gz
tar xzf Nagios-Monitoring-Plugin-0.51.tar.gz
cd Nagios-Monitoring-Plugin-0.51
perl Makefile.PL
make
make test
make install

Re: Check_sip.pl

Posted: Mon Feb 25, 2019 3:23 pm
by Rook
Yes i did both.

Re: Check_sip.pl

Posted: Mon Feb 25, 2019 3:32 pm
by scottwilkerson
Can you post the current error?