Perl SNMP Printer check


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.

   Print the messages of the printer

   Prints the model of the printer

   Prints the number of pages printed

   Checks tray number  for paper status, use 0 for all trays

   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.

   Search for exact consumable string, not just substring comparison

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