title: CUPS Printer Queues: State
agents: linux, freebsd
catalog: os/services
license: GPLv2
distribution: check_mk
description:
 This check uses the output of {lpstat -p} and {lpstat -o} as sent by the
 Checkmk linux agent. It lists the general state of a queue and the jobs
 in the printer queue of the CUPS printing system.

 The check analyzes the overall state of a printer using the first words in
 each line of {lpstat -p}. The words "is idle", "disabled since", "now printing"
 trigger the resulting state.
 The resulting state also depends on the number of jobs in the queue and
 the age of the oldest job in the queue.

 Be aware that custom parameters for jobs in
 queue will be preferred. Even if e.g. "disabled since" would result in {CRIT}
 but the length of queue is {OK} and vice versa.

 To be able to use this check, please deploy the agent plug-in {mk_cups_queues}.

item:
 The name of the printer in CUPS as printed by {lpstat -p}.

discovery:
 One service is created for each available printer in {lpstat -p} output.
