Page 1 of 2

Check_iftraffic64.pl

Posted: Mon Aug 08, 2016 9:05 am
by ednaldojta
Good morning friends,
I'm setting up a traffic checking service of exit and entry NagiosXI with check_iftraffic64.pl plugin.
When I run the command on the command line, I get the result as the image and attachment.
When I set up the service, I test with the command in the test check Command, and also get success, however when I save the setting, appears to me the critical screen, with the "Return code of 13 is out of bounds" message

Re: Check_iftraffic64.pl

Posted: Mon Aug 08, 2016 9:37 am
by bwallace
A return code of 13 is usually permissions-related.
What is the output of:
ls -l /usr/local/nagios/libexec/check_iftraffic64.pl

What is the outcome of running the check from command line as user 'nagios'

Code: Select all

su nagios
./check_iftraffic64.pl -H xxx.xxx.xxx.xxx 

Re: Check_iftraffic64.pl

Posted: Mon Aug 08, 2016 10:43 am
by ednaldojta
Follow the error and the plugin.

Re: Check_iftraffic64.pl

Posted: Mon Aug 08, 2016 10:47 am
by bwallace
Thanks, but we still need to see the output of:
ls -l /usr/local/nagios/libexec/check_iftraffic64.pl

Re: Check_iftraffic64.pl

Posted: Mon Aug 08, 2016 11:30 am
by ednaldojta
follows the output

Re: Check_iftraffic64.pl

Posted: Mon Aug 08, 2016 12:12 pm
by lmiltchev
Can you run the following command, and show the output?

Code: Select all

ls -lad /usr/local/nagios/libexec/traffic
ls -la /usr/local/nagios/libexec/traffic
grep nag /etc/group

Re: Check_iftraffic64.pl

Posted: Mon Aug 08, 2016 12:16 pm
by ednaldojta
follows

Re: Check_iftraffic64.pl

Posted: Mon Aug 08, 2016 12:34 pm
by lmiltchev
It is strange that you have two files in the "traffic" directory with completely different permissions (apache:apache & root:root)... Mine are all root:nagios. Have you manually changed these?

What are the permissions of the "traffic" directory itself?

Code: Select all

ls -lad /usr/local/nagios/libexec/traffic

Re: Check_iftraffic64.pl

Posted: Mon Aug 08, 2016 12:37 pm
by ednaldojta
follows

Re: Check_iftraffic64.pl

Posted: Mon Aug 08, 2016 12:47 pm
by rkennedy
When you run the test check command, it uses the apache user / group. This will cause the permissions NOT to work when Nagios goes to run the check organically. Please do not use the test check command prior otherwise you'll experience what you have.

You'll want to delete the folder /usr/local/nagios/libexec/traffic, and then let it get re-created organically. After doing so, the checks should work as expected as the permissions will be correct.