On 4/25/07, Steve Huston <[EMAIL PROTECTED]> wrote:
I'm in the process of defining events for traps sent by APC UPSes, and
setting up "clear" events to clear out the traps as needed (ie, a
upsTurnedOn event clears a upsTurnedOff event).  But I've found a
serious problem in the logic, just not sure where yet:

If I have an event, say, upsBatteryNeedsReplacement, which shows up as
critical - if the event upsBatteryReplaced later comes through (with
severity "clear") I want the NeedsReplacement event to go to the history
(the Replaced event goes directly to history).  So in the
NeedsReplacement event, I set "upsBatteryReplaced" for the
zEventClearClasses.  Sure enough, if I send a NeedsReplacement trap, it
shows up critical - and then sending a BatteryReplaced trap clears it
out and they both go to the history.

The problem is that I also discovered *any* event with severity "Clear"
will clear out all the other events.  So a upsTurnedOn event will clear
a upsBatteryNeedsReplacement.  This is definitely a Bad Thing.  The only
zEventClearClasses entry for these events is whatever should clear them,
nothing else (for all but one event so far, that's one other companion
trap; one event has two traps that can clear it).

If nobody else has found this before, I'll dig through the source and
see if I can find the bug, and file a ticket regardless of what I've
found (since maybe someone else can find it then).

Steve,

Zenoss will definitely support this case. It's probably the most
common usage of the event mapping system. All you need to do is create
separate event classes for these events. I'd do it something like
this:

Create event classes:
 /UPS/TurnedOff
 /UPS/TurnedOn

 /UPS/Battery/NeedsReplacement
 /UPS/Battery/Replaced

Setup the zProperties for the event classes:
 /UPS/TurnedOff:
   zEventSeverity = Critical (or whatever you want)

 /UPS/TurnedOn:
   zEventClearClasses = /UPS/TurnedOff
   zEventSeverity = Clear

 /UPS/Battery/NeedsReplacement:
   zEventSeverity = Critical (or whatever you want)

 /UPS/Battery/Replaced:
   zEventClearClasses = /UPS/Battery/NeedsReplacement
   zEventSeverity = Clear

--
Chet Luther
[EMAIL PROTECTED]
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to