Check the Status of Printer’s Cartridges using SNMP with Nagios

Don’t you hate getting those IT requests to replace toners in printers  at the office? yep! me too, if you have Nagios installed and want Nagios to let you know when toner’s are running low in those printers then there is a script to quickly do that. Download the script from this link I used version 3 for my printers.

Remember to make the script executable when you upload it to your /usr/local/nagios/libexec directory ( or wherever you keep your plugins )  then open your commands.cfg file and add this command:

 define command {
command_name check_snmp_printer
 command_line /usr/local/nagios/libexec/check_snmp_printer -H $HOSTADDRESS$ -C $ARG1$ -x $ARG2$ -w $ARG3$ -c $ARG4$
 }

Then define your host:

define host{
use         generic-printer                 ; Inherit default values from a template
host_name   name-of-printer-      ; The name we're giving to this host
alias        alias of your printer    ; A longer name associated with the host
address       IP of your printer                  ; IP address of the remote windows host
contact_groups	 contact-group
}

Then define the service:

 define service{
use generic-service
service_description check-toners 
check_command check_snmp_printer!public!”CONSUM Toners”!20!10
}

Reload the Nagios service, and you should see the status of the toners on those printers now..

image

Share the knowledge...Share on FacebookTweet about this on TwitterShare on LinkedInShare on Google+Share on RedditEmail this to someonePrint this page

More Nagios Tutorials

about My name is Nelson Amaya and I’m the author of this website. I created the site in 2009 (under the forevergeeks.com domain) and I’ve been posting tutorials here ever since. I'm a systems / network administrator and I enjoy solving complex problems and learning as much as I can about new technologies. I write tutorials based on my work experience and other IT stuff I find interesting.