SNMP Uptime with Warning and Critical Level

For now i’m testing with this command:

./check_snmp -H 10.0.0.157 -C public -o .1.3.6.1.2.1.1.3.0 --delimiter=’)’ -P 2c -l “Uptime is”

But I want that if the uptime is between 0 and 5 min that it is a critical level and between 5 min and 10 min a waring level.

I know that I must use -w and -c but how do I specify a range?

by default warnings and critical levels are increasing counters… so you could have a warning level LOWER than the critical… i don’t know if it’s possible to have the inverse…
you could try with the regex option… something like “if uptime is only one digit”.

Luca

-c max:min -w max:min
in your case -c 5:0 -w 10:6
./check_snmp --help shows this.