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

Login

Remember Me

Directory Tree

check_cups_printer

Rating
1 vote
Favoured:
0
Hits
153199
Files:
FileDescription
check_cups_printer.tar.gzcheck_cups_printer.tar.gz
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Simple script for checking the status of a specific CUPS printer.
Although there are a few scripts that will give an overall view of the CUPS system and queue lengths I needed to specifically target high priority printers to ensure they were always up and accepting jobs.

This simple script will take CUPS server hostname and CUPS printer as arguments and display it's current status. It will determine if the CUPS printer is in one of the following states: idle, printing, rejecting, disabled, or unable to connect.

This script will either return an OK for idle and printing or a CRITICAL for anything else.

Syntax is as follows:

./check_cups_printer.sh -h [CUPS SERVER] -p [PRINTER QUEUE NAME]

Requirements: lpstat, bash
Reviews (1)
Because lpstat returns the messages in your local language, check_cups_printer won't be able to parse data if your language is not en_EN.

Make sure you change it for the system account running the check, or at the script itself.