How can I view the last response string of a custom string sensor in PRTG for processing, and how can I test string processing to see the output based on the input and defined processing?


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.


More

Manual: Custom String Sensor

Manual: Regular Expressions

External: regex101.com


Disclaimer:
The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.