Return code of 13 is out of bounds

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.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Return code of 13 is out of bounds

Post by braindope »

Hi,

Can anyone experience this kind of Status information in Nagios is say
"Return code of 13 is out of bounds"

I have check the file in /tmp and it has a correct ownership

I'm using the check_fortigate.pl pugins, the cluster, Memory and Sessions service are having that kind of error
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Return code of 13 is out of bounds

Post by Box293 »

Did you originally test the plugin at the command line as the root user?

It's likely that the files created were for the root user and the nagios user (what monitoring engine runs as) cannot update them.

Try deleting the file in /tmp and then force an immediate check from the Nagios interface, does this fix the problem?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: Return code of 13 is out of bounds

Post by braindope »

Hi Box,

The problem still persist :cry: , I have clear the files in /tmp then re-run the checks.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Return code of 13 is out of bounds

Post by Box293 »

So what is the output when you run the command at the cli?

Code: Select all

su nagios
./check_fortigate.pl -H xxx.xxx.xxx.xxx 
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: Return code of 13 is out of bounds

Post by braindope »

Hi Box,

I have run ./check_fortigate.pl -H IP -C string -T Cluster in nagios user, it yielded positive results, and magically in my nagios web interface the check went OK

However for Memory and Session has the same output as in the Cluster, this is definitely weird
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Return code of 13 is out of bounds

Post by Box293 »

Looking at the plugin code it looks like it uses a path to store files:
-p --path STRING Path to store serial filenames, default /usr/lib/nagios/plugins/FortiSerial
Do you have anything like this? I believe it will be named the ip address.

Or perhaps you could run with the -p argument pointing to /tmp

Code: Select all

./check_fortigate.pl -H IP -C string -p /tmp -T Memory
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: Return code of 13 is out of bounds

Post by braindope »

Hi Box,

I have run the command below

./check_fortigate.pl -H IP -C string -p /tmp -T Memory

But it says unknown option p

Below are the only option in my plugins:
Options:
-H --host STRING or IPADDRESS Check interface on the indicated host
-C --community STRING Community-String for SNMP
-T -- type STRING CPU, MEM, Ses, VPN, Cluster
-S --serial STRING Primary serial number
-s --slave get values of slave
-w --warning INTEGER Warning threshold, applies to cpu, mem, session.
-c --critical INTEGER Critical threshold, applies to cpu, mem, session.
-R --reset Resets ip file (cluster only)
-M --mode STRING Output-Mode: 0 => just print, 1 => print and show failed tunnel, 2 => critical
-V --vpnmode STRING VPN-Mode: both => IPSec & SSL/OpenVPN, ipsec => IPSec only, ssl => SSL/OpenVPN only
-? --help Returns full help text
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Return code of 13 is out of bounds

Post by Box293 »

This is where I downloaded the plugin from:

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

It's version is dated 2015-04-08 at the beginning of the file.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: Return code of 13 is out of bounds

Post by braindope »

Hi Box,

Thanks for the link i've found the answer in there my
check_command check_fortigate_status!memory!string!60!70!
is at fault it should be
check_command check_fortigate_status!mem!string!60!70!
same thing for my sessions checking.

Additional:
i have run the check as root user for the plugins to create a file in my FortiSerial folder. This solve my Return code of 13 is out of bounds error.

Thank you for your usual help :D
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Return code of 13 is out of bounds

Post by Box293 »

Great, glad you were able to get to the bottom of it :D
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked