I started with roed's code.  Only thing was missing was the dedupid.  Variable 
didn't seem to be populated.

This seems to work.   Thanks roed.


Code:

mydedupid = "%s|%s|%s|%s|%s|%s" % (evt.device, evt.component, evt.eventClass, 
evt.eventKey, evt.severity, evt.summary)
evt.message = mydedupid
em = device.getEventManager()
# Note, it sometimes takes 1-2 minutes before the count 
# is updated in db, did not want to incur a reIndex on each
# message.  Adding stmt below works however.
# em.reIndex()
try:
  ed = em.getEventDetail(dedupid=mydedupid)
  mycount = ed.count
except:
  mycount = 0

if mycount > 2:
  evt.severity = 4






-------------------- m2f --------------------

Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=29124#29124

-------------------- m2f --------------------



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

Reply via email to