Monitoring toner level in SNMP capable HP printer

Monitoring toner level in Hewlett-Packard printers

To monitor HP printer black toner amount and several parameters related to printer state Hewlett-Packard printers state monitoring application template can be used. If you need to monitor other parameter please take a look at the tutorial below.

In this tutorial, we will set up a SNMP monitor to watch the amount of toner remaining in a Hewlett-Packard (HP) printer also if there are several toners available, check out of paper error and so on.

Click on the thumbnail pictures provided to view their full version.

Setting up monitoring parameters

It is assumed you know how to create SNMP monitor already; we only show how to select proper OID to monitor toner level and/or other printer state variables.

Open your SNMP monitor’s Main parameters tab.

Launch the MIB browser (see above for instructions) to proceed. If you haven’t loaded proper MIB files (you would need IANA-PRINTER-MIB and Printer-MIB v2), MIB browser will not show you much useful information (most OID tree entries will be marked Unknown). Download the mentioned MIB files, click on “MIBs” button (lower left corner of the MIB browser) and look whether the required MIBs are loaded already.

If IANA-PRINTER-MIB and Printer-MIB are both present in the list, just skip this step. Otherwise, make sure the downloaded MIB files are placed into %ProgramData%\IPHost Network Monitor\mibs and click “Import” button. Select one of MIB files and click “Open”. Import the other MIB file in the same way, if necessary.

Find OID values for toners parameters

In case the below OID trees do not represent required data, you might need to browse HP-LASERJET-COMMON-MIB to find proper OIDs. Consult tech.support of HP for more information.

Important: when using proprietary MIBs, be ready to see the same OIDs under different names, or find different OIDs reflecting the same properties mentioned below.

If your printer is monochrome (uses black toner only), you can skip this part. To proceed setting up monitors, you should first locate toner parameters. To do that, enter in the Search field in MIB browser string 1.3.6.1.2.1.43.11.1.1 (prtMarkerSuppliesEntry) to find the required branches.

You can find toner colors by browsing tree 1.3.6.1.2.1.43.11.1.1.6 (prtMarkerSuppliesDescription) – typical display will look like this:

1.3.6.1.2.43.11.1.1.6.0.1 "black ink"
1.3.6.1.2.43.11.1.1.6.0.2 "yellow ink"
1.3.6.1.2.43.11.1.1.6.0.3 "cyan ink"
1.3.6.1.2.43.11.1.1.6.0.4 "magenta ink"

Note: “ink” may be reported regardless of whether the printer is inkjet or laser.

You can find measurement units by browsing tree 1.3.6.1.2.1.43.11.1.1.6 – note the final numbers, they match the mentioned above toner colors. Units are identified by integer values from list PrtMarkerSuppliesSupplyUnitTC (browse PRINTER-MIB file), most probably it’s 19 (percent) or 13 (tenthsOfGrams) in case of toner.

Next, you should find the maximal sensor value for the given toner color. To find that, browse tree 1.3.6.1.2.1.43.11.1.1.8 (prtMarkerSuppliesMaxCapacity) – typical display will look like this:

1.3.6.1.2.43.11.1.1.8.0.1: 674
1.3.6.1.2.43.11.1.1.8.0.2: 240
1.3.6.1.2.43.11.1.1.8.0.3: 226
1.3.6.1.2.43.11.1.1.8.0.4: 241

the above are maximal values (when corresponding cartridge is 100% full). Integer values can vary greatly and there’s no general/default value. The last integer matches the color with the same last integer (i.e., 1.3.6.1.2.43.11.1.1.8.0.3 is for cyan toner).

Finally, current sensors values can be found in the subtree 1.3.6.1.2.1.43.11.1.1.9 (prtMarkerSuppliesLevel). Note that you should refer to the color names entries to select proper color for your monitor. If you divide the value from 1.3.6.1.2.1.43.11.1.1.9 by same-index value from 1.3.6.1.2.1.43.11.1.1.8 and multiply by 100, you get the percentage of toner remaining.

Detect “out of paper” and related errors

The below OIDs could also be used to detect input/output error conditions:

1.3.6.1.2.1.43.9.2.1.1 (prtOutputIndex): output capacity (0 or more; 0 means out of paper)
1.3.6.1.2.1.25.3.5.1.2 (hrPrinterDetectedErrorState): octet string of
length 2 (2 bytes); if bits below are set, corresponding error condition is in effect:
 lowPaper              0
 noPaper               1
 lowToner              2
 noToner               3
 doorOpen              4
 jammed                5
 offline               6
 serviceRequested      7
 inputTrayMissing      8
 outputTrayMissing     9
 markerSupplyMissing  10
 outputNearFull       11
 outputFull           12
 inputTrayEmpty       13
 overduePreventMaint  14
If both bytes are zero, no error condition detected.

Conclude setting up monitor parameters

Now refresh MIB browser main view by clicking “Refresh” button. To find OIDs related to measuring toner amount, enter word “Supplies” to the right of “Find” label. The browser will only display those entries with the mentioned word present in their names.

We will use “prtMarkerSuppliesLevel” entry. Note: the whole OIDs tree and values of the entries may be different in your case.

Select the mentioned entry and click “OK” to return to monitor Main parameters tab.

Now set up monitor so it triggers an alarm wherever the supplies level (toner amount) is depleting too low.

Open State conditions tab in Parameters/Results pane.

Warning state condition is used when the monitored parameter isn’t already acceptable, but the value isn’t that wrong to raise an alarm. Down state condition is used when it is time to raise a real alarm.

Please consult the OID sections above, or your printer user manual for procedure to find proper value as boundary value. In this example, we will trigger a warning when there are less than 20 units of toner supplies left, and make the monitor change to Down state when there’s less than 5. Choose proper values for your given case.

To know more about setting up alerts, read Alerting and Actions section of Quick Start Guide.

What to do next?

Congratulations! You have just created your SNMP monitor to notify you when your HP printer is about to run out of toner supply (or is out of paper, etc.). What to do next?
First, set the polling interval on monitor Main parameters tab accordingly. Most probably you won’t use the default value of 60 seconds (poll every minute) and could raise it, say, to 5 minutes.
You can alter the newly created monitor; for example, you can monitor how fast the toner is getting used up by changing counter type to “Delta” and setting performance checks accordingly (for example, warn if the toner level between subsequent checks dropped by more than 10 units and raise a performance problem alert if it dropped by more than 50 units).

You can also copy (clone) this monitor and choose another color to monitor, if required. For example, to create monitor for different toner color without fully repeating all the process of creating and finding proper OID value.

Please consult the quick start guide for more suggestions and ideas on how to use SNMP monitors.


IPHost Network Monitor 5.1 build 14047 of April 04, 2019. File size: 68MB