Check_snmp with bool as return

Hi there!
I need to check some OIDs which are returning true (for good status) or false (for bad status).
I can’t test, as the status is the health status for disks.
If I send

./check_snmp -H 10.10.130.75 -C public -P 2c -o 1.3.6.1.4.1.674.11000.2000.500.1.2.14.1.5.1 -m ALL

I get “SNMP OK - true(1)”.
No matter what I enter for critical, I always get a critical back.
How would the value for critical look like, or does the check even return critical by default if I get false(0) as return?

1 Like

Hi,
I would have a play with using the check_snmp -r (–ereg) parameter:

-r, --ereg=REGEX
Return OK state (for that OID) if extended regular expression REGEX matches

I haven’t used it myself so I can’t offer any more advice on exactly what the regex should look like.