HPLJ2055dn printer return hrPrinterDetectedErrorState via SNMP OID = .1.3.6.1.2.1.25.3.5.1.2.1 which type is 'Hex-STRING' (typically 1 byte long represented by two octets) and interpreted as field of bits. The first idea to use my custom XML lookup file (with 'BitField' tags), and 'SNMP Custom String Lookup' sensor, but that sensor return me wrong value (' ' instead of sexadecimal string like '00' for example).
What is the right way to get proper value from hexadecimal strig typed SNMP OID ? And what is the optimal way to interpret each bit of it?
Thanks for answers.
Article Comments
Thanks, Felix. But which way to convert extracted hexadecimal string to integer value (for purpose of further custom lookup with 'BitField' tags)? 'Extended Processing' with REGEXP '\d' extract only 0-9 digits from number, not hexadecimal. And what radio switch 'Interpret Result As' option can be used?
Feb, 2021 - Permalink
Hello there,
I would recommend to use a SNMP Custom String sensor. The sensor can handle the result as bytes in hexadecimal notation.
Kind regards
Felix Wiesneth - Team Tech Support
Feb, 2021 - Permalink