Skip navigation
2405 Views 2 Replies Latest reply: May 21, 2012 9:58 AM by Philip Warren RSS
ieldib Rank: White Belt 43 posts since
Jun 29, 2011
Currently Being Moderated

May 18, 2012 1:16 PM

4.x  can't escalate event severity based on count

I tried this method:


# Create the dedup id; This is what zenoss normally does to the event to ascertain if
# it is a duplicate (another occurance) of an existing event. We are doing it in this
# transform to be able to reference the count variable, which does not come with an
# incoming event.
dedupfields = [
    evt.device, evt.component, evt.eventClass, evt.eventKey, evt.severity]
if not evt.eventKey:
    dedupfields += [evt.summary]
mydedupid = '|'.join(map(str, dedupfields))

# Get the event details (including count) from the existing event that is in the mysql database
em = dmd.Events.getEventManager()
    ed = em.getEventDetail(dedupid=mydedupid)
    mycount = ed.count
    mycount = 0

# Do what you like with the count and event;
# In this example we up the severity to CRITICAL if the count is > 3
if mycount > 3:
    evt.severity = 5


With no sucess.  


I believe it has alot to do with getEventManager being crippled in 4.x    Any help is appreciated.

More Like This

  • Retrieving data ...


  • Correct Answers - 4 points
  • Helpful Answers - 2 points