Hello,
With respect to the "check_snmp" plugin -- from the help page "the -t (timeout flag) does the optional ":<timeout state>" can be a state integer (0,1,2,3) or a state string" does this mean that we can set the return state (ok, warning, critical, unknown) in the case of a timeout?
Second, can you confirm that the check snmp plugin doesn't return anything from the gui when given the -t flag? I checked it from the command line & when i remove the -t flag it returns the expected result.
check_snmp
Re: check_snmp
Nagios plugin docs-t, --timeout=INTEGER:<timeout state>
Seconds before connection times out (default: 10)
Optional ":<timeout state>" can be a state integer (0,1,2,3) or a state STRING
Yes, I believe the second argument for the -t flag determines what state will be returned, should the plugin timeout.
I should also mention that these values are read several times, and the final state is actually determined by a series of checks.
check_snmp man pagesNOTE the final timeout value is calculated using this formula: timeout_interval * retries + 5
Please see the documentation on state types if you are not familiar with this logic.
Nagios state types
I can confirm that the -t flag works when I change it in the GUI. I get the following output.
Code: Select all
[[email protected] ~]$ /usr/local/nagios/libexec/check_snmp -H <IP address> -o 'sysUpTime.0' -C '<community string>' -P 2c -t 1
SNMP OK - Timeticks: (2886921348) 334 days, 3:13:33.48 | DISMAN-EVENT-MIB::sysUpTimeInstance=2886921348As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!