Perl SNMP Printer check

check_snmp_printer

Based upon a shell script for snmp checking of printers, I've rewritten it in perl to make it more performant and easier to add/extend and maintain. You can also now monitor all paper trays at once (albeit buggy since not all printers give correct info).

Required Arguments

-H, --host=HOST
   The name or address of the host running SNMP.

--messages
   Print the messages of the printer

--model
   Prints the model of the printer

--pagecount
   Prints the number of pages printed

--tray=i
   Checks tray number  for paper status, use 0 for all trays

--consum="ALL"|"TEST"|
   Check consumable containing  for status,
   use "TEST" to get a list of all consumables
   use "ALL" to get the status of all consumables

Optional Arguments

-P, --community=STRING
   The community string of the SNMP agent. Default: public

-S, --snmpver=STRING
   The version of snmp to use.  1 and 2 are supported. Default: 1

-t, --timeout=INTEGER
   Number of seconds to wait for a response.

--exact
   Search for exact consumable string, not just substring comparison

--verbose
   When given, also prints out all OK consumables and their levels and
   the printer messages for option --consum