On Sep 22, 2008, at 5:19 AM, HaydnH wrote:
I have some data points setup as derives to calculate rates of
change and I want to make sure the value is actually changing, i.e:
a value of 0 is a fail and any positive or negative value is OK. How
is this possible in Zenoss?
A MIN/MAX value of 0 is the opposite of what I want as it's val==0
rather than val!=0... any ideas?
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 ([\d\.]+)',
evt.message)
if match and float(match.groups()[0]) != 0:
evt.severity = 0
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users