Home Directory Plugins Hardware Printers Check your printer consumables status using SNMP

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


Remember Me

Directory Tree

Check your printer consumables status using SNMP

13 votes
Current Version
Last Release Date
Compatible With
  • Nagios 3.x
  • Nagios 4.x
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Check your printer consumables status using SNMP
This plugin can check your printer consumables status using SNMP v1 queries.
This plugin can check your printer consumables status using SNMP v1 queries.

check_snmp_printer is written in Bash and is distributed under the GPLv2 license. This plugin have been created by Yoann LAMY.

Usage: ./check_snmp_printer -H xxx.xxx.xxx.xxx -C public -t consumable -o black -w 85 -c 90

Name or IP address of host (default:
Community name for the host's SNMP agent (default: public)
Check type (consumable, page, info) (default: page)
Consumable (black, cyan, magenta, yellow, drum) (default: black)
Warning level for consumable in percent (default: 0)
Critical level for consumable in percent (default: 0)
Print this help screen
Print version and license information

This plugin uses the 'snmpget' command and 'snmpwalk' command included with the NET-SNMP package.
This plugin support performance data output. If the percentage of the warning level and the critical level are 0, then the script returns a state OK.

Examples :

./check_snmp_printer -H xxx.xxx.xxx.xxx -C public -t consumable -o black -w 85 -c 90
./check_snmp_printer -H xxx.xxx.xxx.xxx -C public -t page

This nagios plugins comes with ABSOLUTELY NO WARRANTY.

You may redistribute copies of the plugins under the terms of the GNU General Public License v2.
Reviews (8)
bysavage, September 18, 2022
A few questions:
How can i check waste bin?
can I check all toner level (black, cyan, magenta, yellow) in one command?
byazertywxcvbn, October 6, 2016
0 of 1 people found this review helpful
Hello, first thank you for this plugin it's right the plugin I was searching.
But i've a problem for consumables. When i do :
./check_snmp_printer -H -C public -t consummable -o black -w 85 -c 90
it return me : Utilisation of the black cartridge : 31% | cons_used=31;85;90;0
So i think it works in command lines but when i go on nagios web interface it writes me "Service State : unknown" for all consumables (not for pages)
Here is a part of my printer.cfg file :
define service {
host_name Wolf-P01/INFORMATIQUE, Workcentre Color 550/ENTRE MARKETING ET ACHAT
use generic-service
service_description Black
check_command check_snmp_printer_consummable!public!black!90!95
So i don't know from where it can come.

Thank you for the answer and sorry for my bad english (i'm french).
byjriker1, December 22, 2015
I'll give credit for an almost perfect implementation. Problem I'm having is it doesn't actually set an alert. Using the examples above, and the fixes others provided, if I set the warning threshold to 90 and my consumables are 90 it shows green. If I set it to 89 it still shows green. Looks like it's not reading in the variable right or something.
Owner's reply

What is the printer model ?
What is the result of this command ?
> snmpwalk -v 1 -c public xxx.xxx.xxx.xxx .


byclatramp, January 28, 2014
on debian and ubuntu ,
needs some edit the script :
-from CMD_BASENAME="/bin/basename" to CMD_BASENAME="/usr/bin/basename"
-from CMD_AWK="/bin/awk" to CMD_AWK="/usr/bin/awk"

and all services check_snmp_printer_consummable need to add two exclamations and not one between the public and colour
example from check_command check_snmp_printer_consummable!public!yellow!90!95 to

working the black with Dell 2350dn Laser Printer
and all colours with HP LaserJet 100 colorMFP M175nw

byDef1ant, March 25, 2013
I am having the same issue as mmuniyap. This looks like exactly what I am looking for, I just can't seem to get it to function properly. I would appreciate any help you could offer. Thank you.
byvyncynt, November 27, 2012
works well with lexmark printers.
just had to edit some lines for it to be compatible for other consumables.
I tired to implement this pulgin but somehow the pulgin is not working. Got error - (Return code of 126 is out of bounds - plugin may not be executable), which turned out to be the problem that puligin was not complied and hence not found by the system. Please let me know how do i compile this printer pulgin alone.
byathlon128, December 29, 2010
Works fine with HP LaserJet 4350.