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..


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

Nelson has written 180 tutorials

Hi there, my name is Nelson Amaya and I’m the author of this website. I am a motivated self-taught systems administrator with more than 12 years of experience in the IT field. 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.

Please add me to your LinkedIn professional network or subscribe to my email list to get the latest updates.

BTW, If you are an IT Pro, and if you haven't read "The Phoenix Project" novel yet, I definitely recommend it to you. In my opinion, all IT books are sort of boring, but this novel is very entertaining, I didn't want stop reading it when I got the book. Check it out The Phoenix Project: A Novel for IT Professionals

Thank you,