Return code of 255 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.
Pippen
Posts: 8
Joined: Sun Dec 13, 2015 8:15 am

Return code of 255 is out of bounds

Post by Pippen »

Hi Lads,

Good Day!

Seeking on your professional advice. I am having an issue in our nagios. "Return code of 255 is out of bounds" . I manually check the plugin ./check_fortigate_status -H xxx.xxx.xxx.xx4 -m cpu -C public


And result we're

#########################################################################################################

Code: Select all

Oops! Your model doesn't seem to be supported by this script... Yet!

If you want to help out, try running the following command (replace "FGXXXXXXXXXXXXXX" with your Fortigate's serial number):

        snmpwalk -v 2c -c public [FortiGate IP address] .1.3.6.1.4.1.12356 | grep -iR "FGXXXXXXXXXXXXXX"

The OIDs for CPU usage and other stats are almost always found near an OID containing the unit's serial number.

For example, here's the output I get:

        # snmpwalk -v 2c -c public 172.16.10.10 .1.3.6.1.4.1.12356 | grep -iR "FGT80C1234567890"
                iso.3.6.1.4.1.12356.100.1.1.1.0 = STRING: "FGT80C1234567890"
                iso.3.6.1.4.1.12356.101.13.2.1.1.2.1 = STRING: "FGT80C1234567890"

Now, all I need is to find which OID branch contains the info I want.
To do this, I grab the OID of the first result...

        iso.3.6.1.4.1.12356.100.1.1.1.0

... remove the last two digits...

        iso.3.6.1.4.1.12356.100.1.1

... and use that with snmpwalk.

        # snmpwalk -v 2c -c public 172.16.10.10 iso.3.6.1.4.1.12356.100.1.1
                iso.3.6.1.4.1.12356.100.1.1.1.0 = STRING: "FGT80C1234567890"

Hmmm. Nothing useful here.

Let's try the second value.

        iso.3.6.1.4.1.12356.101.13.2.1.1.2.1

... remove the last two digits...

        iso.3.6.1.4.1.12356.101.13.2.1.1

... and try that with snmpwalk!

        # snmpwalk -v 2c -c public 172.16.10.10 iso.3.6.1.4.1.12356.101.13.2.1.1
                iso.3.6.1.4.1.12356.101.13.2.1.1.1.1 = INTEGER: 1
                iso.3.6.1.4.1.12356.101.13.2.1.1.2.1 = STRING: "FGT80C1234567890"
                iso.3.6.1.4.1.12356.101.13.2.1.1.3.1 = Gauge32: 99
                iso.3.6.1.4.1.12356.101.13.2.1.1.4.1 = Gauge32: 72
                iso.3.6.1.4.1.12356.101.13.2.1.1.5.1 = Gauge32: 19690
                iso.3.6.1.4.1.12356.101.13.2.1.1.6.1 = Gauge32: 212
                iso.3.6.1.4.1.12356.101.13.2.1.1.7.1 = Counter32: 4185780372
                iso.3.6.1.4.1.12356.101.13.2.1.1.8.1 = Counter32: 2786324006
                iso.3.6.1.4.1.12356.101.13.2.1.1.9.1 = Counter32: 0
                iso.3.6.1.4.1.12356.101.13.2.1.1.10.1 = Counter32: 0
                iso.3.6.1.4.1.12356.101.13.2.1.1.11.1 = ""
                iso.3.6.1.4.1.12356.101.13.2.1.1.11.1 = No more variables left in this MIB View (It is past the end of the MIB tree)

Ooohhh... I like this!
The third and fourth values turn out to be the values for CPU and RAM usage, respectively..

So, try to find the values for your model, and I'll update the script with your findings.

##########################################################################################################


i tried what it says above but the thing is, when i tried to do snmpwalk there is no value.

snmpwalk -v 2c -c public xxx.xxx.xxx.xx4 .1.3.6.1.4.1.12356 | grep -iR "FG600C3913802129


can you please help me guys? we badly need the services to work properly. Thank you.
Last edited by tmcdonald on Mon Feb 29, 2016 11:58 am, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Return code of 255 is out of bounds

Post by hsmith »

What's the output without the grep?
Former Nagios Employee.
me.
Pippen
Posts: 8
Joined: Sun Dec 13, 2015 8:15 am

Re: Return code of 255 is out of bounds

Post by Pippen »

Hi Sir,

There is no output with the grep sir.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Return code of 255 is out of bounds

Post by tmcdonald »

What model of Fortigate are you using? This is not a standard check that we maintain, so it would be up to the author to add it in.
Former Nagios employee
Pippen
Posts: 8
Joined: Sun Dec 13, 2015 8:15 am

Re: Return code of 255 is out of bounds

Post by Pippen »

Hi Sir Donald,

Apologies for the delayed response. The fortigate firmware version is v5.2.4,build688 (GA)
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Return code of 255 is out of bounds

Post by jolson »

Can you walk the device at all?

Code: Select all

snmpwalk -v2c -c public -m ALL xxx.xxx.xxx.xx4 .
What about that specific branch?

Code: Select all

snmpwalk -v2c -c public -m ALL xxx.xxx.xxx.xx4 .1.3.6.1.4.1.12356
One number lower?

Code: Select all

snmpwalk -v2c -c public -m ALL xxx.xxx.xxx.xx4 .1.3.6.1.4.1
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Pippen
Posts: 8
Joined: Sun Dec 13, 2015 8:15 am

Re: Return code of 255 is out of bounds

Post by Pippen »

HI Sir Jolson,

Sir, i can do snmpwalk and with results sir.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Return code of 255 is out of bounds

Post by tgriep »

Can you run the following commands on the Nagios system and upload the /tmp/snmp.txt file?

Code: Select all

snmpwalk -v2c -c public -m ALL xxx.xxx.xxx.xxx >/tmp/snmp.txt
snmpwalk -v2c -c public -m ALL xxx.xxx.xxx.xxx -On >>/tmp/snmp.txt
Also, can you have the Fortigate MIB file, can you upload that as well?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Pippen
Posts: 8
Joined: Sun Dec 13, 2015 8:15 am

Re: Return code of 255 is out of bounds

Post by Pippen »

Sir im sorry, but for security reasons, i cant provide the details the you wanted. Thanks anyway.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Return code of 255 is out of bounds

Post by rkennedy »

Would you prefer to PM it over to one of us?

We would need to see the output of the snmpwalk to help you further.
Former Nagios Employee
Locked