On Sep 25, 2008, at 6:52 AM, HaydnH wrote:
Due to the way the MIN/MAX are evaluated (min must always be less
than max) it isn't possible to handle this with a DERIVE data point
and a threshold. However, with the addition of an event class
transform we can make this work.
The first step is to create a threshold on this data point that
will ALWAYS be violated. The easiest way to do this is to make the
MIN = 1 and MAX = -1. Now you need to create the event class
transform that will set the severity of these events to 0 (CLEAR)
if the value is not 0.
Let's say you created an event class called /Perf/MyCustom and are
sending these threshold events to this class. Go to that event
class, click its menu, choose more then transform. Put the
following in the transform.
import re
match = re.search('threshold of [^:]+: current value -{0,1}([\d\.]
+)', evt.message)
if match and float(match.groups()[0]) != 0:
evt.severity = 0
Corrected by me, was a " - should have been a '.
Added by me to handle negative changes.
You may also want to be careful about the decimal places as the
event summary which we're comparing to only shows 2 decimal places -
the application we monitor returns values to 12 decimal places so I
had to add an RPN on the graph point to multiply the value by
10000000000 (using the RPN: 10000000000,*) to make sure the decimal
places weren't ignored.
There was a final solution to this thread if anyone is interested.
Haydn suggested that using the absolute value of the returned data
point would be a good way to handle this instead. This way a threshold
with a minimum of 0 could be used. Unfortunately Zenoss wouldn't
support the ABS RRD function in the graphing and thresholding engine.
So we updated Zenoss to handle the ABS function.
Ticket #3773: Support ABS in threshold RPNs
http://dev.zenoss.org/trac/ticket/3773
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users