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.
I'd like to insert a threshold in order to launch an alarm (i.e. if the value drops under -70).
I usually use the check_snmp options -w and -c, but maybe them work only with INTEGER values.
There is a simple solution mixing the check_snmp options?
As it returns a string, you will have to create your own plugin script to convert the string to a number (maybe round it to an integer as well) and then check your thresholds that way.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Just to pile on here, in bash, variables are technically untyped, though many of the nagios plugins, written in C, are typed. You could write your own script to snmpget the oid and then run a comparison. If you wish to round in bash, sed is usually my preferred way of doing it:
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.