Build precise queries to find exactly what you need
Press ESC to close
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
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!