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.