Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Directory

shiz0

Reviews(1)
byshiz0, September 24, 2014
SNMP Printer Check
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