SnmpMonitor is not able to manage "OCTET STRING"
Description
Environment
Acceptance / Success Criteria
Lucidchart Diagrams
Activity

Antonio Russo November 26, 2012 at 8:03 AM
Fixed in master and 1.10
MacBook-Pro-di-Antonio-Russo:opennms-1.10 antonio$ git push
Password:
Counting objects: 46, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (21/21), done.
Writing objects: 100% (24/24), 2.07 KiB, done.
Total 24 (delta 13), reused 0 (delta 0)
To ssh://rssntn67@opennms.git.sourceforge.net/gitroot/opennms/opennms
7f0785c..e654b39 1.10 -> 1.10
655fd18..c0a9444 master -> master
commit c0a9444ccebb1551672390b28693a5d0aa2bd2c2
Author: Antonio <rssntn67@yahoo.it>
Date: Mon Nov 26 13:59:44 2012 +0100
Fix for manage Hex String in SnmpMonitor
It is possible to set a new parameter hex to true
if you want to treat the string as an OctetString
in the SnmpMonitor configuration

Antonio Russo November 23, 2012 at 4:13 PM
This has been discussed and the solution is to add a parameter hex the hex value can be false|true.
Default hex parameter value is false. When hex is true then the content is declared as octetstring and not as a displaystring.
By default snmpMonitor class convert the string as a displayString.
If the hex="true" then it is converted using the toHexString() method of SnmpValue class.

Antonio Russo October 4, 2012 at 1:11 PM
I have a customer with device status all displayed using "Hex" String...here is one example from their mib..
AvailabStatus ::=
TEXTUAL-CONVENTION
DISPLAY-HINT "2x"
STATUS current
DESCRIPTION
"Bits in network order:
octet 1 octet 2
1
5432 1098 7654 3210
xxxx xxxx xxxx xxxx
|
|
| +-customAlm |
---|---|---|---|
|
|
| +--regimeRunning |
|
|
| +---hardwareFault |
|
| +----badRegime | |
|
| +------badConfigCRC | |
|
| +-------missingConfig | |
|
| +--------missingRegime | |
| +---------upAlarm | ||
| +------------missingBoard | ||
| +-------------badBoardType | ||
| +--------------fwUpgradeInProgress | ||
+---------------ethLinkDown To match the status of the "SnmpMonitor" defined service you have to check the result from this variable... |
In the case you want to check over and hex defined value from a specific oid you do not have any ability.
It would be useful to convert the hex value as a string and then match the corresponding sting using the ~ and = operator.