<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style>
</head>
<body>
<font face="Arial, sans-serif" size="2">
<div>Hi All, </div>
<div> </div>
<div>I'm trying to create a template for monitoring our printers with devmon. </div>
<div>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. </div>
<div>According to the MIB the error conditions are encoded  as bits in a octet string. </div>
<div>So I think this means that I have to convert the octet to a number to do a switch </div>
<div> </div>
<div>My transforms file looks like: </div>
<div>===== transforms file =============</div>
<div>PrinterErrorNum         : CONVERT       : {hrPrinterDetectedErrorState} oct</div>
<div>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</div>
<div>sysUpTimeSecs           : MATH          : {sysUpTime} / 100</div>
<div>UpTimeTxt               : ELAPSED       : {sysUpTimeSecs}</div>
<div>==========</div>
<div> </div>
<div>In the output a get a clear error for the hrPrinterErrorState. </div>
<div>According to the debug output devmon is first making the switch before it is doing the convert. </div>
<div>==== debug output ==== </div>
<div>[07-11-19@10:10:34] DEBUG TESTS: Doing math transform on pzn2401/sysUpTimeSecs</div>
<div>[07-11-19@10:10:34] DEBUG TESTS: Doing elapsed transform on pzn2401/UpTimeTxt</div>
<div>[07-11-19@10:10:34] DEBUG TESTS: Doing switch transform on pzn2401/hrPrinterErrorState</div>
<div>[07-11-19@10:10:34] DEBUG TESTS: Doing convert transform on pzn2401/PrinterErrorNum</div>
<div>[07-11-19@10:10:34] DEBUG TEST: Rendering status message for pzn2401</div>
<div>[07-11-19@10:10:34] DEBUG TESTS: pzn2401 had one or more clear errors during test status</div>
<div>==========</div>
<div> </div>
<div>Please help, how can I solve this ? </div>
<div> </div>
<div>Regards, </div>
<div> </div>
<div>Bert Klomp</div>
<div> </div>
<div> </div>
</font>
</body>
</html>