Check_iftraffic64.pl

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ednaldojta
Posts: 103
Joined: Tue Apr 07, 2015 7:52 am

Check_iftraffic64.pl

Post 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
You do not have the required permissions to view the files attached to this post.
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Check_iftraffic64.pl

Post 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 
Be sure to check out the Knowledgebase for helpful articles and solutions!
ednaldojta
Posts: 103
Joined: Tue Apr 07, 2015 7:52 am

Re: Check_iftraffic64.pl

Post by ednaldojta »

Follow the error and the plugin.
You do not have the required permissions to view the files attached to this post.
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: Check_iftraffic64.pl

Post by bwallace »

Thanks, but we still need to see the output of:
ls -l /usr/local/nagios/libexec/check_iftraffic64.pl
Be sure to check out the Knowledgebase for helpful articles and solutions!
ednaldojta
Posts: 103
Joined: Tue Apr 07, 2015 7:52 am

Re: Check_iftraffic64.pl

Post by ednaldojta »

follows the output
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check_iftraffic64.pl

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
ednaldojta
Posts: 103
Joined: Tue Apr 07, 2015 7:52 am

Re: Check_iftraffic64.pl

Post by ednaldojta »

follows
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check_iftraffic64.pl

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
ednaldojta
Posts: 103
Joined: Tue Apr 07, 2015 7:52 am

Re: Check_iftraffic64.pl

Post by ednaldojta »

follows
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check_iftraffic64.pl

Post 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.
Former Nagios Employee
Locked