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.
But in Nagios the alert is not going CRITICAL and alerting. It remains green despite registering 'SNMP CRITICAL - *2* ' in the Status Information.
I am presuming this is something to do with the way in which snmp is passing return codes/arguments in the command but I don't seem to be able to get to the bottom of the issue. I have tried defining the critical alert with no luck so at the minute I am just stuck with the correct output, but no Nagios alert - rendering the entire thing pointless in monitoring terms.
To add to this, Nagios will change statuses based on the exit codes like you mentioned. 0 = ok, 1 = warning, 2 = critical, and 3 = unknown. The -r matching with the # output should work out as @rhassing mentioned.
-r has worked in this case and is now getting me the results I need. Is there a way to define the exit codes (0 = ok, 1 = warning, 2 = critical, and 3 = unknown) within the check_snmp command defined in Nagios?
rkennedy wrote:Thanks @rhassing!
To add to this, Nagios will change statuses based on the exit codes like you mentioned. 0 = ok, 1 = warning, 2 = critical, and 3 = unknown. The -r matching with the # output should work out as @rhassing mentioned.