Page 1 of 2

check_iferrors_percent

Posted: Tue Sep 29, 2015 8:19 am
by PolleroM
Hello.
I'm trying to use this perl command to monitor error interface on a single switch port.
But when I try it from nagios console and with root privilege this is the error received:
[root@localhost libexec]# ./check_iferrors_percent
Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./check_iferrors_percent line 39.
BEGIN failed--compilation aborted at ./check_iferrors_percent line 39
.
It seems Plugin is not installed but may be my version is non correct.
How can i solve this issue?
Thanks

Re: check_iferrors_percent

Posted: Tue Sep 29, 2015 9:57 am
by PolleroM
However on Nagios Web interface the final result is like picture.
I'm confused: it works or it doesn't work?

Re: check_iferrors_percent

Posted: Tue Sep 29, 2015 2:18 pm
by jdalrymple
You're missing the perl utilities. Install them.

https://exchange.nagios.org/directory/P ... in/details

If you're using an EL and have EPEL available you can yum install:

Code: Select all

yum install nagios-plugins-perl

Re: check_iferrors_percent

Posted: Wed Sep 30, 2015 2:30 am
by PolleroM
Hello
I've tried installa using
yum install nagios-plugins-perl
I manually copied PLUGIN.PM on all repositories showned on error message.
But error is the same:

[root@localhost libexec]# ./check_iferrors_percent
Can't locate Nagios/Plugin.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./check_iferrors_percent line 39.
BEGIN failed--compilation aborted at ./check_iferrors_percent line 39.
It seems Plugin is not installed but may be my version is non correct.

Re: check_iferrors_percent

Posted: Wed Sep 30, 2015 3:37 pm
by ssax
Try using this command:

Code: Select all

yum install perl-Nagios-Plugin
Thank you

Re: check_iferrors_percent

Posted: Fri Oct 02, 2015 1:30 am
by PolleroM
Hello.
Installtions worked fine.
Now If I manually try commad check_iferrors_percent a new error appear.
See attached file.
Thanks

Re: check_iferrors_percent

Posted: Fri Oct 02, 2015 4:46 am
by PolleroM
Hello.
On CHECK_INTERFACE_PERCENT script I changed make_path command and used mkpath.
Now with root privilege script works fine.
Only one problem is to use like Nagios user privilge (see attached file).
How can I set correct permission?
Thanks

Re: check_iferrors_percent

Posted: Fri Oct 02, 2015 9:41 am
by PolleroM
Hello.
Some other operations I've done:
1) chmod 777 /usr/local/nagios/libexec/check_iferrors_percent
2) chmod o+w /var/cache/nagios
Now command works fine also like NAGIOS privilege:
[nagios@localhost libexec]$ ./check_iferrors_percent -H 10.236.4.170 -C public -w 0.0075 -c 0.01 -i 19
IFERRORS CRITICAL - Interface error rates for host 10.236.4.170 | 19_out_discards=0%;0.0075;0.01 19_in_discards=0%;0.0075;0.01 19_out_errors=0%;0.0075;0.01 19_in_errors=0%;0.0075;0.01


But the problem is: response is CRITICAL Always, for each interface....
I'm a little depressed...

Re: check_iferrors_percent

Posted: Fri Oct 02, 2015 2:04 pm
by hsmith
Longshot, but what if you change

Code: Select all

./check_iferrors_percent -H 10.236.4.170 -C public -w 0.0075 -c 0.01 -i 19
to

Code: Select all

./check_iferrors_percent -H 10.236.4.170 -C public -w 0.0075 -c 0.001 -i 19
I do not know how many decimal points this plugin accepts by default off the top of my head.

Re: check_iferrors_percent

Posted: Sun Oct 04, 2015 5:31 am
by PolleroM
Hello
Error is the same:
[root@localhost libexec]# ./check_iferrors_percent -H 10.236.4.170 -C public -w 0.0075 -c 0.001 -i 19
IFERRORS CRITICAL - Interface error rates for host 10.236.4.170 | 19_out_discards=0%;0.0075;0.001 19_in_discards=0%;0.0075;0.001 19_out_errors=0%;0.0075;0.001 19_in_errors=0%;0.0075;0.001
[root@localhost libexec]# ./check_iferrors_percent -H 10.236.4.170 -C public -w 0.0075 -c 0.01 -i 19
IFERRORS CRITICAL - Interface error rates for host 10.236.4.170 | 19_out_discards=0%;0.0075;0.01 19_in_discards=0%;0.0075;0.01 19_out_errors=0%;0.0075;0.01 19_in_errors=0%;0.0075;0.01


-w is the warning level
-c is the critical level
normally -w value should be less than -c value....
thanks