Build precise queries to find exactly what you need
Press ESC to close
Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More
Great script, all is working well, except for STATUS. It kept returning WARNINGS:
# snmpget -v 1 x.x.x.x -c xxxx 1.3.6.1.2.1.25.3.5.1.1.1 HOST-RESOURCES-MIB::hrPrinterStatus.1 = INTEGER: idle(3)
# ./check_snmp_printer -H x.x.x.x -C xxxx -x “STATUS” WARNING: Printer status is idle
It seems like the script didnt trigger the idle case (line 268), but jumped stright to *) (line 277).
I’m not that familiar with bash scripting but I played around a bit when I changed line 268 from “idle(3)”) to idle) it worked as expected and now I got:
# ./check_snmp_printer -H x.x.x.x -C xxxx -x “STATUS” OK: Printer status is idle
I think maybe the output is different for different printers, so I changed it again to idle|3|”idle(3)”) –> idle OR 3 OR idle(3) and it still works like a charm (at least on our 3 DELL printers, tests on the big Xerox machine are up later).
Regards, shiz0