Home » Categories » General Topics » 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 AdminP@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/

0 (0)
Article Rating (No 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
Log Checks
Viewed 103 times since Tue, Nov 28, 2017
Scheduled Task Checks
Viewed 116 times since Tue, Nov 28, 2017
Load Checks
Viewed 339 times since Thu, Nov 9, 2017
Uptime Checks
Viewed 146 times since Sun, Nov 26, 2017
Disk Performance Checks
Viewed 139 times since Sun, Nov 26, 2017
Operating System Checks
Viewed 262 times since Tue, Nov 14, 2017
Process Checks
Viewed 201 times since Thu, Nov 23, 2017
Agent Checks
Viewed 230 times since Tue, Nov 14, 2017
Health Checks
Viewed 160 times since Wed, Nov 29, 2017
Network Interface Checks
Viewed 256 times since Mon, Nov 20, 2017