Home Directory Plugins Hardware Printers Perl SNMP Printer check

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

Perl SNMP Printer check

Current Version
1.6
Last Release Date
2010-03-04
Compatible With
  • Nagios 3.x
Hits
106446
Files:
FileDescription
check_snmp_printer.plcheck_snmp_printer.pl version 1.6
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
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).
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)
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?
byNooJ, February 16, 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.
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.