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
153743
Files:
FileDescription
check_cups_printer.tar.gzcheck_cups_printer.tar.gz
Nagios CSP

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!
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.