Preliminarily I'd say take a look at
$ZENHOME/Products/ZenModel/MinMaxThreshold.py.  Somewhere around line
198 (on 2.1.3) there is a method named 'checkRange()'.  Around line
219 there you should see the following:

summary = '%s %s threshold of %s %s: current value %.2f' % (
  self.context().deviceName, label, self.name(), how, float(value))

This doesn't help you to set the event transform information, but
that's definitely where the event text is getting created.  It looks
to me like the "value" is being pulled from the RRD files themselves
(see method 'check()' and/or checkRaw() around line 165 / 179 in the
same file) and then munged into a text string representation, together
with the device name, etc.

Since it's really just a text string I would just create a transform
that uses a regex to match a number appearing at the end of the line,
then take that number and make it more human-readable depending on
which event class it is (eg, /Perf/{Filesystem,Interface}, etc.), and
then rewrite the summary with the human-readable version instead of
the ugly raw data.

Just my thoughts.  This is how I would approach most event transform
issues like this--just take the summary and whatever other "extra"
information is in the event detail, and do some fancy string
manipulation to make it look the way I want.

--

seth wright ([EMAIL PROTECTED])
windows engineer
540.568.2912 (office)
james madison university



On Wed, Jun 11, 2008 at 1:41 PM, snarkout
<[EMAIL PROTECTED]> wrote:
> I'd like to change how threshold alerts appear through a transform, but I 
> cannot find the data sources anywhere - I've looked in the api docs, but 
> frankly can't make heads or tails of them.  Basically, I want
>
>
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to