Hello
I'll try to answer this with an example.
If you create a SNMP Custom String sensor that monitors the 1.3.6.1.2.1.1.1.0 OID of an HP Switch, it will as an example show the following message:
ProCurve J9021A Switch 2810-24G, revision N.11.64, ROM N.10.01 (/sw/code/build/bass)
If you wanted to extract the revision number, you can use regular expressions to accomplish that, in this case (\d+\.\d+) with a Group Index of 2 provides the following result:
11,64
The regular expression (regex) can be entered within the Sensor's settings, under the "Extended Processing" heading. Once this has been configured the following sensor query will be processed accordingly.
Note: A result of -999999999999 indicates that the extracted value could not be converted into a number.
You can additionally check with our SNMP Tester if the monitored OID returns a String and it's value.
Click for Fullscreen image
Additional links:
Manual: Custom String Sensor
Manual: Regular Expressions
External: regex101.com
Add comment