help with devmon template required

Klomp, H. klomph at nlr.nl
Mon Nov 19 10:16:31 CET 2007


Hi All,

I'm trying to create a template for monitoring our printers with devmon.
I'm using the "hrPrinterDetectedErrorState" snmp variable (.1.3.6.1.2.1.25.3.5.1.2.1) to get the status of the printer.
According to the MIB the error conditions are encoded  as bits in a octet string.
So I think this means that I have to convert the octet to a number to do a switch

My transforms file looks like:
===== transforms file =============
PrinterErrorNum         : CONVERT       : {hrPrinterDetectedErrorState} oct
hrPrinterErrorState     : SWITCH        : {PrinterErrorNum} 0 = normal, 1 = request service, 2 = offline, 4 = jamed, 8 =door open, 16 =now toner, 32 = low toner, 64 = no paper, 128 = low paper
sysUpTimeSecs           : MATH          : {sysUpTime} / 100
UpTimeTxt               : ELAPSED       : {sysUpTimeSecs}
==========

In the output a get a clear error for the hrPrinterErrorState.
According to the debug output devmon is first making the switch before it is doing the convert.
==== debug output ====
[07-11-19 at 10:10:34] DEBUG TESTS: Doing math transform on pzn2401/sysUpTimeSecs
[07-11-19 at 10:10:34] DEBUG TESTS: Doing elapsed transform on pzn2401/UpTimeTxt
[07-11-19 at 10:10:34] DEBUG TESTS: Doing switch transform on pzn2401/hrPrinterErrorState
[07-11-19 at 10:10:34] DEBUG TESTS: Doing convert transform on pzn2401/PrinterErrorNum
[07-11-19 at 10:10:34] DEBUG TEST: Rendering status message for pzn2401
[07-11-19 at 10:10:34] DEBUG TESTS: pzn2401 had one or more clear errors during test status
==========

Please help, how can I solve this ?

Regards,

Bert Klomp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20071119/7c292478/attachment.html>


More information about the Xymon mailing list