Q. We want to create a custom SNMP probe that generates a 'critical' alert for a certain value. but does not clear until another (lower) value. For example a temperature sets the alarm off at 100 deg Fahrenheit, but does not clear the alarm until it reaches below 90 deg Fahrenheit. Is there a way to do this?

A. Here is a sample probe which demonstrates a method for doing this:

<!--
Delayed Okay Probe (com.dartware.snmp.delayok.txt)
Custom Probe for InterMapper (http://www.intermapper.com)
Please feel free to use this as a base for further development.

Original version 27 Apr 2010 -rmc
-->

<header>
"type" = "custom-snmp"
"package" = "com.dartware"
"probe_name" = "snmp.delayok"
"human_name" = "Delayed Okay"
"version" = "1.2"
"address_type" = "IP,AT"
"port_number" = "161"
display_name = "Miscellaneous/Test/Delayed Okay"
</header>

<description>
\GB\Delayed Okay\P\

This custom SNMP probe demonstrates a technique for delaying the change from critical to okay until a lower threshold is reached.

The Trip parameter is the threshold above which the device will go critical.
The Reset parameter is the threshold below which the device will return to okay.

For this demo probe, a sine wave is calculated to produce values for testing.

</description>

<parameters>

"Trip" = "80"
"Reset" = "70"

</parameters>

<snmp-device-variables>

sine, sin($count/57.2957795), CALCULATION, ""
count, (($count + 4) % 360), CALCULATION, ""
value, $sine*50 + 50, CALCULATION, "value"
vstr, sprintf("%4.1f",$value), CALCULATION, "value as string"

tmp1, $value >= ${Trip} ? $value : 0, CALCULATION, "tripped?"
tmp2, $value <= ${Reset} ? 0 : $value, CALCULATION, "reset?"
status, $status > 0 ? $tmp2 : $tmp1, CALCULATION, "status for threshold"

</snmp-device-variables>

<snmp-device-thresholds>

critical: $status >= ${Trip} "Value ($vstr) is above ${Trip}."
critical: $status > ${Reset} "Value ($vstr) is still above ${Reset}."
okay: $status == 0 "Value is $vstr"

</snmp-device-thresholds>

<snmp-device-display>

\B5\Delayed Okay Probe\0P\

\4\ Calculated value:\0\ ${chartable: ###.# : $value}

</snmp-device-display>