Printers

Perl SNMP Printer check

Description:

Based upon a shell script that does snmp printer checks (see http://exchange.nagios.org/directory/Plugins/Hardware/Printers/SNMP-Printer-Check/details), I decided the performance would much better if it was written in perl. So I converted the script to perl, and added an option to check all paper trays at once (except the bypass trays).

Current Version

1.6

Last Release Date

2010-03-04

Compatible With

  • Nagios 3.x

Project Files
Project Notes
Based upon a shell script that does snmp printer checks (see http://exchange.nagios.org/directory/Plugins/Hardware/Printers/SNMP-Printer-Check/details), I decided the performance would much better if it was written in perl. So I converted the script to perl, and added an option to check all paper trays at once (except the bypass trays). Usage: 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
Reviews (3) Add a Review
In Nagios the returned value is "null"
by Komcsi, January 31, 2013

I have the same problem! If I use this check in the command line its working fine but the Nagios with the same command arent working properly. Nagios returned value is "null"... Any experience about this problem?



Question
by NooJ, February 29, 2012

Hello, I wanted to try your snmp_printer plugin but I'm a bit lost. I don't know how to describe the plugin in the commands.cfg and in my printer.cfg Actually I have something like that : In commands.cfg # 'check_snmp_printer.pl' command definition define command{ command_name check_snmp_printer command_line $USER1$/check_snmp_printer.pl -H $HOSTADDRESS$ $ARG1$ -P -S -t $ARG2$ And in printer.cfg define service{ use generic-service host_name Printer1 service_description Toner Supply check_command check_snmp_printer!public!"CONSUM Toners"!20!10 } define service{ use generic-service host_name Printer1 service_description Printer Model check_command check_snmp_printer!public!"MODEL" } Thanks for your help.



This works great...at the command line
by ICTAS_HAL, December 31, 2011

But I am having issues in nagios on top of FreeBSD. In nagios as I play with the cfg it either exits with null or program did not exit properly. I am wondering if anyone has a printer cfg they could share.



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.3 (3)
Favorites
0
Views
106,911