check_iferrors_percent

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
PolleroM
Posts: 24
Joined: Wed Aug 12, 2015 1:33 am

check_iferrors_percent

Post 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
PolleroM
Posts: 24
Joined: Wed Aug 12, 2015 1:33 am

Re: check_iferrors_percent

Post by PolleroM »

However on Nagios Web interface the final result is like picture.
I'm confused: it works or it doesn't work?
Attachments
WebResult.jpg
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: check_iferrors_percent

Post 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
PolleroM
Posts: 24
Joined: Wed Aug 12, 2015 1:33 am

Re: check_iferrors_percent

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_iferrors_percent

Post by ssax »

Try using this command:

Code: Select all

yum install perl-Nagios-Plugin
Thank you
PolleroM
Posts: 24
Joined: Wed Aug 12, 2015 1:33 am

Re: check_iferrors_percent

Post by PolleroM »

Hello.
Installtions worked fine.
Now If I manually try commad check_iferrors_percent a new error appear.
See attached file.
Thanks
Attachments
img.jpg
PolleroM
Posts: 24
Joined: Wed Aug 12, 2015 1:33 am

Re: check_iferrors_percent

Post 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
Attachments
IMG2.jpg
PolleroM
Posts: 24
Joined: Wed Aug 12, 2015 1:33 am

Re: check_iferrors_percent

Post 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...
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_iferrors_percent

Post 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.
Former Nagios Employee.
me.
PolleroM
Posts: 24
Joined: Wed Aug 12, 2015 1:33 am

Re: check_iferrors_percent

Post 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
Locked