Printer supply monitoring with SNMP and PRTG
I finally found a simple to use but very powerful network monitoring package. All I wanted was something like MRTG to tell me how much bandwidth was being used on our WAN links. Because of our strict security requirements we were not allowed to use MRTG. I stumbled across PRTG Network Monitor and it worked perfectly for showing network bandwidth. After digging through it a bit more I found that it could do much more. I am now using it to monitor all the hardware on our network. From routers and switches to servers and SANs. Today I was able to configure monitoring for all our printers, including toner levels. The hardest part with the printers was finding the correct MIBs. Hopefully this post will help the next person.
I’ve updated this post after finding out that not all printers return a percentage of toner left. Instead some return the approximate number of pages left.
It seems most printers use an industry standard for MIBs. In this case it is Printer MIB v2 by IANA (RFC 3805). In that document there are actually two MIBs. The first one is IANA-PRINTER-MIB starting on line 12. The second one is Printer-MIB starting on line 1296. Because the MIBs also reference a 3rd MIB you’ll need to get that one too. The 3rd MIB is RFC 3808; IANA-CHARSET-MIB. I found the two RFC documents here http://www.snmplink.org/OnLineMIB/Standards/index.html#677 First I had to break apart RFC 3805 into 2 files with the file names the same as the MIB names. To use these with PRTG you’ll need to use the PRTG MIB importer utility to import the Printer-MIB which will also bring in the referenced MIBs. Then save a partial OIDLIB file that PRTG can use. The section you want is prt marker supplies (18.104.22.168.22.214.171.124.2.1.3).
You’ll need 3 oids. The first one is prt marker supplies description which will return the name of the supply like Black Cartridge. The next one is prt marker supplies level. The last one is prt marker supplies max capacity. If the max capacity is 100 then you can just use the supplies level as a percentage of remaining toner. Some printers will show something like 13000 for max capacity on one of the toner cartridges. In this case you need to divide the level by the max capacity and multiply by 100 to get the percentage left. In PRTG you would use the Sensor Factory sensor http://www.paessler.com/manuals/prtg/sensor_factory_sensor.htm .