I setup this sensor to monitor a custom OID that returns a number depending on error/warning. if the result is 1 set to warning, and if it's 2 set to error. Well if there's no error or warning the value is NULL or not set. How do I program this in the Custom String Sensor?

-> Error state: Must not include 2

-> Warning state Must not include 1

Both are set to plain text and both "Must include" fields are blank. I've tried entering what PRTG reports "NULL2" or just "NULL" along with Regex to match empty string "()", sensor still errors or shows down.


Article Comments

Dear Mousware

This kind of condition cannot be used to trigger an error or warning. PRTG always compares a numeric sensor value against a numeric limit value.

For complex value evaluations please write a script for the Exe/Script sensor, and return a numeric value which you then use to trigger different sensor states. Using the free net-snmp package, you can query SNMP values from a powershell script or other programs.


Mar, 2015 - Permalink

I didn't think this was complex. How about any value returned error/down state, NULL or nothing green/OK? Will that work?


Mar, 2015 - Permalink

Dear Mousware

PRTG compares a numeric sensor value against a numeric limit value. If the OID returns nothing (an empty string) the sensor will turn into alarm state caused by a typecast error.


Mar, 2015 - Permalink