Skip to content

Printer over SNMP (snmp_printer) ​

Reads a printer or multifunction device that has a Printer-MIB (RFC 3805) agent, together with the printer objects of HOST-RESOURCES-MIB: whether it is running, idle or printing, the level of every toner, drum and other supply, how full the waste container is, how much paper is left in the trays, how many alerts are active, and the page count.

What it looks like ​

The page of an snmp_printer sensor in the light theme

The sensor's page after a few polls, reading a laser printer. In the dark theme: the sensor's page. The form for adding it, with its parameters filled in: light, dark.

Channels ​

KeyNameUnitDefault limits
device_statusDevice statusnonevalue map: 1 unknown, 2 running, 3 warning, 4 testing, 5 down
printer_statusPrinter statusnonevalue map: 1 other, 2 unknown, 3 idle, 4 printing, 5 warming up
alerts_criticalCritical alertsnonenone
alerts_warningWarningsnonenone
supply_min_pctLowest supply%warning below 15, error below 5
waste_max_pctFullest waste container%warning above 85, error above 98
paper_min_pctLowest paper tray%warning below 10
pages_totalPages printedpagesnone
supply_<n>the printer's own name for the supply, with level (consumables) or full (waste containers)%none. Set limits on the sensor.

A supply level is shown as a percentage of the supply's capacity. The MIB has three values that are not numbers (other, unknown, and "some remaining", which printers use for a fuser or a drum whose wear they do not measure); those supplies are unknown, never zero. A printer that reports no capacity is unknown for the same reason. The per-supply channels, one for each toner, drum and waste container (at most 24), are named by the printer, so Black Toner Cartridge level is the black toner's graph. The key is the supply's index on the printer; it stays the same while the printer's supply table does.

The sensor's own verdict: Down when the printer says it is down; Warning when it reports a warning, has a critical alert active, or reports a paper jam, an open door, no paper, no toner, or that it is offline. Low toner and low paper alone are not a verdict: they are the limits on supply_min_pct and paper_min_pct, which you can change. The message names what the printer detected (low toner, paper jam), or the description of its first alert.

Parameters ​

ParameterDefaultMeaning
supply_channelsonReport each supply as a channel of its own. Switch it off to keep only the lowest and the fullest.
port161UDP port of the SNMP agent.

Suggested interval: 300 seconds. Credential: SNMP. Discovery adds this sensor to a device that lists a printer in HOST-RESOURCES-MIB.

On the target ​

Switch SNMP on in the printer's network settings (often on the web page of the printer, under Network, SNMP), with a read-only community or a v3 user. Many printers ship with public readable; use a community of your own.

Failures ​

MessageMeaning
the device offers no Printer-MIB or HOST-RESOURCES printer objects (kind protocol)Not a printer, or its SNMP agent has the objects switched off.
SNMP errorsAs for snmp_interface.

Verification ​

Checked againstWhat it showed
Recordings of a Dell laser printer, a Brother multifunction device and a Brother laser printer, replayed by an SNMP simulator, liveThe supplies of each (toner, drum, imaging unit, maintenance and roller kits) with their levels, the supplies whose capacity the printer does not give (unknown, not 0), the page count of the one that has it, the trays, and the error state. All three answer the supply type and not the class, which the sensor handles. Discovery attaches the sensor to all three and not to a switch, a firewall or a Linux host.
Scripted answers built from RFC 3805 and RFC 2790A printer that is down, a jam, an open door, active alerts of both severities, a waste container that is 90 % full, levels that are not numbers, a supply table with no capacity, trays, the page count, and a device that is not a printer.

Not seen: a printer that reports an alert or an error (the recordings are of idle, healthy printers), a waste container (none of the three has one), a colour printer with its four toners, hrPrinterStatus (the recordings leave it out), a printer on battery or in sleep, SNMPv3. The Brother and Dell recordings give paper trays that are empty by design (manual feed), which is why paper_min_pct has no default limit.

The live tests read the simulator through PROBEWARD_TEST_SNMPSIM_HOST, PROBEWARD_TEST_SNMPSIM_PORT and PROBEWARD_TEST_SNMPSIM_COMMUNITIES (see tests/snmpsim_live.rs), and skip without them. The recordings are GPL and are not in this repository.

AGPL-3.0-only