Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_printer - All in one printer check suitable for most devices
2015-04-10
176473
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
This plugin is written in php and requires php_snmp
*UPDATED*
- Added kyocera 13XX Support
- Added Ricoh Support (thanks to Sebastian Puschhof)
The plugin was developed by the security company ciphron. It was tested with several hundred printers. For more information in german visit: Nagios überwacht Papierfächer, Toner, Tinte und Kostenstellen bei Druckern.
Last update: Oliver Skibbe (oliskibbe (at) gmail.com)
Commandline (with german comments):
check_printer ip community snmpversion command
SNMPversion -> 1 or v2c
-> counter num
Gibt verschiedenen Counter des Druckers aus. Counter 2-num sind Ricoh spezifisch.
Counter 1 ist immer Lifetimecounter fuer gedruckte Seiten. Liefert perfdata.
Status ist immer OK wenn Counter existiert ansonsten UNKNOWN.
-> toner/ink num warn max
Gibt den Status des Toners bzw der Tinte aus. Liefert Fuellstand als perfdata wenn
moeglich. Wenn der Drucker falsche Maximalwerte fuer Patronen/Toner liefert
(z.b. HP Businessink) kann mit max der richtige Wert angegeben werden (meist 100).
warn gibt die Schwelle zwischen ok und warning an (0.0 bis 1.0; default: 0.2 = 20%)
-> paper num warn
Gibt den Status des Papiertrays num aus. Liefert Fuellstand als perfdata wenn moeglich.
warn gibt die Schwelle zwischen ok und warning an (0.0 bis 1.0; default: 0.2 = 20%)
-> hardware num
Gibt Status der Komponente num aus (z.b. CPU, RAMDISK).
Liefert perfdata wenn moeglich (Bedeutung oft ungewiss).
-> parts num
Gibt den Status des Druckerteiles num aus (Bsp: Rear Unit).
-> alerts
Gibt alle wichtigen Druckermeldungen aus. Ignoriert soweit moeglich unwichtige Meldungen
(z.b. Energiesparmodus oder Aufwaermphase). Gibt bei jeder Meldung Status=warning.
Bei Meldungen die trained bzw fieldservice erfordern oder servity gleich critical ist
wird Status=critical zurueckgegeben.
-> accounting pw num warn
Gibt den Status der Kostenstelle 1-num aus (Kyocera). Kostenstellen koennen per
"KM Net for Accounting" oder im Druckermenu durch gedrueckt halten von OK und
Druck auf Menu erstellt werden.
Passwort setzt sich zusammen aus Druckernummer (4stellig) und wird dann mit 0 auf
15 Stellen aufgefuellt. (bsp FS-2000 => 200000000000000)
warn gibt die Schwelle zwischen ok und warning an (0.0 bis 1.0; default: 0.2 = 20%)
Liefert perfdata
Examples:
check_printer ip community snmpversion command num
Num depends on your printer, some printer do have some extra covers or have a ssd so please try to set num for yourself correctly (mostly there are more than one counter)
Papertray:
# paper tray 2
$ check_printer 192.168.123.1 public 1 paper 2
# alerts
$ check_printer 192.168.123.1 public 1 alerts
OK - ( 5 3 10 1 0 1001) ( 5 3 10 1 0 1001)
# pagecounts, just iterate through the argument after counter
$ check_printer 192.168.123.1 public 1 counter 1
OK - Total: 95 | pagecount=95;
# hardware parts
$ check_printer 192.168.123.1 public 1 hardware 1
OK - FS-2100DN Status=2 | data=2;
# hardware parts
$ check_printer 192.168.123.1 public 1 parts 1
OK - Top Cover Status=4
- Added kyocera 13XX Support
- Added Ricoh Support (thanks to Sebastian Puschhof)
The plugin was developed by the security company ciphron. It was tested with several hundred printers. For more information in german visit: Nagios überwacht Papierfächer, Toner, Tinte und Kostenstellen bei Druckern.
Last update: Oliver Skibbe (oliskibbe (at) gmail.com)
Commandline (with german comments):
check_printer ip community snmpversion command
SNMPversion -> 1 or v2c
-> counter num
Gibt verschiedenen Counter des Druckers aus. Counter 2-num sind Ricoh spezifisch.
Counter 1 ist immer Lifetimecounter fuer gedruckte Seiten. Liefert perfdata.
Status ist immer OK wenn Counter existiert ansonsten UNKNOWN.
-> toner/ink num warn max
Gibt den Status des Toners bzw der Tinte aus. Liefert Fuellstand als perfdata wenn
moeglich. Wenn der Drucker falsche Maximalwerte fuer Patronen/Toner liefert
(z.b. HP Businessink) kann mit max der richtige Wert angegeben werden (meist 100).
warn gibt die Schwelle zwischen ok und warning an (0.0 bis 1.0; default: 0.2 = 20%)
-> paper num warn
Gibt den Status des Papiertrays num aus. Liefert Fuellstand als perfdata wenn moeglich.
warn gibt die Schwelle zwischen ok und warning an (0.0 bis 1.0; default: 0.2 = 20%)
-> hardware num
Gibt Status der Komponente num aus (z.b. CPU, RAMDISK).
Liefert perfdata wenn moeglich (Bedeutung oft ungewiss).
-> parts num
Gibt den Status des Druckerteiles num aus (Bsp: Rear Unit).
-> alerts
Gibt alle wichtigen Druckermeldungen aus. Ignoriert soweit moeglich unwichtige Meldungen
(z.b. Energiesparmodus oder Aufwaermphase). Gibt bei jeder Meldung Status=warning.
Bei Meldungen die trained bzw fieldservice erfordern oder servity gleich critical ist
wird Status=critical zurueckgegeben.
-> accounting pw num warn
Gibt den Status der Kostenstelle 1-num aus (Kyocera). Kostenstellen koennen per
"KM Net for Accounting" oder im Druckermenu durch gedrueckt halten von OK und
Druck auf Menu erstellt werden.
Passwort setzt sich zusammen aus Druckernummer (4stellig) und wird dann mit 0 auf
15 Stellen aufgefuellt. (bsp FS-2000 => 200000000000000)
warn gibt die Schwelle zwischen ok und warning an (0.0 bis 1.0; default: 0.2 = 20%)
Liefert perfdata
Examples:
check_printer ip community snmpversion command num
Num depends on your printer, some printer do have some extra covers or have a ssd so please try to set num for yourself correctly (mostly there are more than one counter)
Papertray:
# paper tray 2
$ check_printer 192.168.123.1 public 1 paper 2
# alerts
$ check_printer 192.168.123.1 public 1 alerts
OK - ( 5 3 10 1 0 1001) ( 5 3 10 1 0 1001)
# pagecounts, just iterate through the argument after counter
$ check_printer 192.168.123.1 public 1 counter 1
OK - Total: 95 | pagecount=95;
# hardware parts
$ check_printer 192.168.123.1 public 1 hardware 1
OK - FS-2100DN Status=2 | data=2;
# hardware parts
$ check_printer 192.168.123.1 public 1 parts 1
OK - Top Cover Status=4
Reviews (11)
bythomash, October 31, 2023
My Brother MFC seems tobe incompatible. It supports SNMP 1 and 2c but the results are weired. Papertray is always critical and Ink is also always critical. There seems to be no way to get the expected results. I have about 500 MFCs.
Thats the check line for Paper Tray: /etc/naemon/libexec/check_drucker.php 10.xx.xx.xx internal v2c paper 3
results are -2 or -3
Counter works perfect, and so is SNMP-Alive and Hardware. For Hardware it says OK - Brother MFC-J5945DW Status=2. Not really sure what status 2 meens, but as long as Status is ok, I guess it is.
Any idea what could cause the problem?
Thats the check line for Paper Tray: /etc/naemon/libexec/check_drucker.php 10.xx.xx.xx internal v2c paper 3
results are -2 or -3
Counter works perfect, and so is SNMP-Alive and Hardware. For Hardware it says OK - Brother MFC-J5945DW Status=2. Not really sure what status 2 meens, but as long as Status is ok, I guess it is.
Any idea what could cause the problem?
byvini0712, May 20, 2016
Hello, yet don't probe this script, but you can find the code description for each one in RFC1759
bymarcelbpunkt, May 9, 2016
Hi there,
I'm using this plugin for toner/ink and alert checks on a handful of Kyocera printers. Toner states are working just fine.
Now to the big, noisy "however" ;)
When there is an alert on a Kyocera FS-4100DN printer (e.g. "toner low"), it does not return "toner low", but a cryptic warning code like
"WARNING - warning codes: 1104,( 4 6 5 1 0 503) ( 5 4 11 1 0 1104)".
If I understand it right, 1104 should stand for "toner low" (at least that's what the printer display says) while 503 could be one of the "ok codes" which are ignored ("sleep mode" and the like). No idea whatsoever what all the other numbers are about.
Does anyone by chance know of sth like an alert code table on the internet? I have not yet been able to find anything in the manuals or by googling.
Thanks a lot in advance!
I'm using this plugin for toner/ink and alert checks on a handful of Kyocera printers. Toner states are working just fine.
Now to the big, noisy "however" ;)
When there is an alert on a Kyocera FS-4100DN printer (e.g. "toner low"), it does not return "toner low", but a cryptic warning code like
"WARNING - warning codes: 1104,( 4 6 5 1 0 503) ( 5 4 11 1 0 1104)".
If I understand it right, 1104 should stand for "toner low" (at least that's what the printer display says) while 503 could be one of the "ok codes" which are ignored ("sleep mode" and the like). No idea whatsoever what all the other numbers are about.
Does anyone by chance know of sth like an alert code table on the internet? I have not yet been able to find anything in the manuals or by googling.
Thanks a lot in advance!
Had some issues with my HP LaserJet 400 MFP M425dn and my HP LaserJet 400 color M451dn, contacted the owner and got great support - everything works like a charm now. I absolutely recommend this plugin!
This is a great plugin, you can use php5-snmp package to run the plugin.
Does a good amount of detail for the checks, so it may need multiple check commands defined so that you can get the full status of the printer!
Does a good amount of detail for the checks, so it may need multiple check commands defined so that you can get the full status of the printer!
Can someone please post examples of the syntax for this plugin? I had tried every combo I can think of and all I get is the damn help text everytime.
bypretorians, December 11, 2012
Guys,I got below error.Please help me.
Error: Service check command 'check_printer' specified in service 'check' for host 'l3_ricoh' not defined anywhere!
Error: Service check command 'check_printer' specified in service 'check' for host 'l3_ricoh' not defined anywhere!
bynotverynick, June 20, 2012
So this is the best plugin I can find, we use Ricoh, this plugin rocks.
However...
What I need to know is, will the printer print if I hit print. Currently the printer can be in a state where it will not print yet the plugin returns either warning or even ok.
For example this morning one of mine has a lever out of place and this was treated as a warning when no jobs would print.
So Essentially I'd love to see this wonderful plugin updated :) I'd actually like:
OK - will print (as much info as you'd like to give)
Warning - unecessary
Critical - won't print (info)
Regardless of my comments this IS the number 1 printer plugin :)
However...
What I need to know is, will the printer print if I hit print. Currently the printer can be in a state where it will not print yet the plugin returns either warning or even ok.
For example this morning one of mine has a lever out of place and this was treated as a warning when no jobs would print.
So Essentially I'd love to see this wonderful plugin updated :) I'd actually like:
OK - will print (as much info as you'd like to give)
Warning - unecessary
Critical - won't print (info)
Regardless of my comments this IS the number 1 printer plugin :)
I've test all the scripts of this webpage, and in my opinion is the best. It informs about all the important things that happens in the printers. Goo job. And thanks!
This plugin is perfect on my HP and Canon printers, however I cannot change the value of toner/ink level :(
best check_print ever seen!