Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
Your review has been submitted and is pending approval.
This plugin can check your printer consumables status using SNMP v1 queries.
Current Version
1.1
Last Release Date
2021-03-16
Owner
LAMY
Website
https://github.com/ynlamy/check_snmp_printer
Download URL
https://raw.githubusercontent.com/ynlamy/check_snmp_printer/master/check_snmp_printer
License
GPL
Compatible With
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 -H ADDRESS Name or IP address of host (default: 127.0.0.1) -C STRING Community name for the host's SNMP agent (default: public) -t STRING Check type (consumable, page, info) (default: page) -o STRING Consumable (black, cyan, magenta, yellow, drum) (default: black) -w INTEGER Warning level for consumable in percent (default: 0) -c INTEGER Critical level for consumable in percent (default: 0) -h Print this help screen -V 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.
A few questions: How can i check waste bin? can I check all toner level (black, cyan, magenta, yellow) in one command?
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 127.0.0.1 -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).
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.
What is the printer model ? What is the result of this command ? > snmpwalk -v 1 -c public xxx.xxx.xxx.xxx .1.3.6.1.2.1.43.11.1.1.6.1 Regards.
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 check_snmp_printer_consummable!public!!yellow!90!95 working the black with Dell 2350dn Laser Printer and all colours with HP LaserJet 100 colorMFP M175nw thanks
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.
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.
Works fine with HP LaserJet 4350.
You must be logged in to submit a review.
To:
From: