Home » Categories » Check Library

Printer Checks

Printer Checks

Printer checks allow you to query the status of printers and their supplies.

 

Nagios Plugins

In you have a HP printer with a Jet Direct card then Nagios Plugins includes a check_hpjd plugin that can provide statistics on the printer.

Command:

./check_hpjd -H 10.25.21.1 -C public -p 161

Output:

Toner Low ("Ready")

 

Alternatively check the SNMP section below for other methods of monitoring printers via SNMP.

NCPA

NPCA does not include a printers module.

An alternative method is to query a performance counter, for example:

\Print Queue(FX DocuPrint M255 z PCL 6)\Job Errors
\Print Queue(FX DocuPrint M255 z PCL 6)\Not Ready Errors
\Print Queue(FX DocuPrint M255 z PCL 6)\Out of Paper Errors

More information about performance counters can be found in the Performance Counter Checks KB article.

NSClient++ via check_nt

NSClient++ does not include a printers module.

An alternative method is to query a performance counter, for example:

\Print Queue(FX DocuPrint M255 z PCL 6)\Job Errors
\Print Queue(FX DocuPrint M255 z PCL 6)\Not Ready Errors
\Print Queue(FX DocuPrint M255 z PCL 6)\Out of Paper Errors

More information about performance counters can be found in the Performance Counter Checks KB article.

NSClient++ via check_nrpe

NSClient++ does not include a printers module.

An alternative method is to query a performance counter, for example:

\Print Queue(FX DocuPrint M255 z PCL 6)\Job Errors
\Print Queue(FX DocuPrint M255 z PCL 6)\Not Ready Errors
\Print Queue(FX DocuPrint M255 z PCL 6)\Out of Paper Errors

More information about performance counters can be found in the Performance Counter Checks KB article.

WMI

Check WMI Plus includes the checkprint module. This example will go critical if several of the error thresholds are greater than 0.

Command:

./check_wmi_plus.pl -H 10.25.14.10 -u administrator -p Str0ngP@ssw0rd -m checkprint -s spooler -a 'FX DocuPrint M255 z PCL 6' -c JobErrors=0 -c NotReadyErrors=0 -c OutofPaperErrors=0

Output:

Overall Status - OK (Sample Period 50 sec) -  Printer Name="FX DocuPrint M255 z PCL 6" (OK) - _BytesPrintedPersec=0, JobErrors=0, Jobs=0, JobsSpooling=0, NotReadyErrors=0,
OutofPaperErrors=0, TotalJobsPrinted=0, TotalPagesPrinted=0|'FX DocuPrint M255 z PCL 6 _BytesPrintedPersec'=0; 'FX DocuPrint M255 z PCL 6 JobErrors'=0;0;
'FX DocuPrint M255 z PCL 6 Jobs'=0; 'FX DocuPrint M255 z PCL 6 JobsSpooling'=0; 'FX DocuPrint M255 z PCL 6 NotReadyErrors'=0;0; 'FX DocuPrint M255 z PCL 6 OutofPaperErrors'=0;0;
'FX DocuPrint M255 z PCL 6 TotalJobsPrinted'=0; 'FX DocuPrint M255 z PCL 6 TotalPagesPrinted'=0;

SNMP

SNMP is the most common method for checking the status of a printer. Due to the varying models of printers available it's not possible to provide examples of how to monitor each one. The Nagios Exchange is a great place to find plugins specific to your printer model.

You can of course check specific OID's via SNMP.

A generic OID could be hrDeviceStatus and it is OK if it returns a running state:

Command:

./check_snmp -H 10.25.21.1 -o hrDeviceStatus.1 -C box293 -P 2c -r running

Output:

SNMP CRITICAL - *warning(3)* |

 

You could also report on a specific OID for that device. In this example I am not generating any alert, I am just using it for information gathering.

Command:

./check_snmp -H 10.25.21.1 -o SNMPv2-SMI::mib-2.43.18.1.1.8.1.1 -C box293 -P 2c

Output:

SNMP OK - "093-426:Check Print Cartridge Soon.(Toner Cartridge)" | 

 

To be successful with SNMP checks you will need to download the MIB file from the manufacturer to understand what a "good" response is. This is why finding a plugin specific to your printer model from the Nagios Exchange can save you some time (and re-inventing the wheel).

 

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

4.5 (2)
Article Rating (2 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Load Checks
Viewed 53730 times since Thu, Nov 9, 2017
Operating System Checks
Viewed 14384 times since Tue, Nov 14, 2017
Scheduled Task Checks
Viewed 18112 times since Tue, Nov 28, 2017
Health Checks
Viewed 14281 times since Wed, Nov 29, 2017
Service Checks
Viewed 34154 times since Tue, Nov 14, 2017
Agent Checks
Viewed 11370 times since Tue, Nov 14, 2017
Process Checks
Viewed 61032 times since Thu, Nov 23, 2017
Performance Counter Checks
Viewed 19545 times since Wed, Nov 15, 2017
CPU Usage Checks
Viewed 33832 times since Sun, Nov 12, 2017
Memory Checks
Viewed 47497 times since Mon, Nov 13, 2017