I have been using Check_MK for a while and we have just upgraded from 1.4.0p38 to 1.6.0p20 but we have seen that our printer Tonner is no longer being tracked correctly.
As from 1.4.0 below, we can see the level of the toner
Ok the black cartridge itself is there but the check gives no good output with only the “OK - [black…”
This you can test on the command line with “cmk --debug --checks=printer_supply -vvn hostname”
Or you can inspect the raw data from the printer with snmpbulkwalk -Cr10 -v2c -c public -m "" -M "" -Cc -OQ -OU -On -Ot 10.0.0.207 .1.3.6.1.2.1.43.11.1.1
I can see by running the cmk --debug --checks=printer_supply -vvn with this printer is does give the correct information but not on the web page:
Supply ADF Pickup Roller HP Z7Y64A OK - 99% (warn/crit at 10% / 5%)
Supply ADF Separation Roller HP Z7Y66A OK - 97% (warn/crit at 10% / 5%)
Supply Black Cartridge HP W9014MC OK - 46% (warn/crit at 10% / 5%)
Supply Black Developer Unit HP Z8W52A OK - 63% (warn/crit at 10% / 5%)
Supply Black Drum HP W9015MC OK - 99% (warn/crit at 10% / 5%)
Supply Fuser Kit HP 110V-Z7Y75A 220V-Z7Y76A OK - 46% (warn/crit at 10% / 5%)
Is there something I have to change to make the output correct?
No the output is normally only a text field and i don’t see any printable special characters in your output.
It looks like there is something special in the output between “Black” and “Cartridge”.
The snmpwalk can give a little bit more information.
It is important if you see there more than one space between theses two words.
Sorry for reply a lot on this I have done the SNMP walk that you said about before and uploaded it here:
If there any more information you would require to help me fix it let me know what to do.
The temp fix me did was to copy the printer_supply from 1.4.0p38 and put it over to get it to display but would like to use the new version of the software.
The output looks ok. I don’t know why it breaks behind the “Black” from the cartridge check.
This must be a bug in the parse function of the “printer_supply” check.
we stumbled across the same problem with our 1.6.0p18 sites. In our case we had this broken output for all cartridges on the printers.
It seems that the problem is a non printable character in the value of the OID which is used for the color of the cartridge.
The check has two possible OIDs from which it pulls the name for the color of the cartridge. In our case the SNMPwalk for these OIDs looked like this:
As you can see the printer sends the names in hex and checkmk is converting it on the server side to “human readable” text. However, you can see that all these values end with 00 which when interpreted as hex is the representation for the NULL-byte and that is a non printable character. This apparently breaks the output in the webinterface, it curioulsy is not a problem for the output on the commandline.
Our temporary fix was to copy the printer_supply-check from ~/share/check_mk/checks/printer_supply to the local-hierarchy ~/local/share/check_mk/checks/printer_supply and add one line (line 152) to strip the NULL-byte from the end of corresponding string:
150 color_info = ""
151 if color and color.lower() not in item.lower():
152 color = color.rstrip('\0')
153 color_info = "[%s] " % color
After this change the check on the webinterface shows the full output and the performace-data again.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.