From: Buchan M. <bg...@st...> - 2007-12-13 16:45:06
|
On Thursday 22 November 2007 09:39:45 Klomp, H. wrote: > 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@10:10:34] DEBUG TESTS: Doing math transform on > pzn2401/sysUpTimeSecs [07-11-19@10:10:34] DEBUG TESTS: Doing elapsed > transform on pzn2401/UpTimeTxt [07-11-19@10:10:34] DEBUG TESTS: Doing > switch transform on pzn2401/hrPrinterErrorState [07-11-19@10:10:34] DEBUG > TESTS: Doing convert transform on pzn2401/PrinterErrorNum > [07-11-19@10:10:34] DEBUG TEST: Rendering status message for pzn2401 > [07-11-19@10:10:34] DEBUG TESTS: pzn2401 had one or more clear errors > during test status ========== > > How can I force devmon to first execute the convert insted of the switch ? I'll see if I can reproduce this. Regards, Buchan |