Skip navigation
5138 Views 6 Replies Latest reply: Apr 28, 2011 8:50 PM by guyhlupi RSS
guyhlupi Rank: White Belt 10 posts since
Apr 20, 2011
Currently Being Moderated

Apr 27, 2011 4:49 PM

Perf/Interface Event Generation for Interface Bandwidth Threshold Exceeded

Hello everyone, this is my first post so be gentle. I'm new to Zenoss and so far have found everything I need by searching but I can't figure this out. I have Cisco device interfaces which are exceeding the 75% bandwidth utilization threshold and generating an event every time, working great. I have a transform that changes the event summary to show percentages (found it on the forum).

 

What I'd like to do now is configure the system to generate an event only if the interface is exceeding the 75% bandwidth utilization threshold for 5 consecutive polls. I'd like to do this so that I know there is at least some level of sustained bandwidth utilization before seeing the event. I've searched everywhere, how can this be accomplished? I've included my current transform below, any assistance would be appreciated.

 

 

import re
match = re.search('threshold of [^:]+: current value ([\d\.]+)', evt.message)
if match and device:
    ifaces = [ i for i in device.os.interfaces() if i.name() == evt.component ]
    if len(ifaces) > 0:
        current = float(match.groups()[0]) * 8
        speed = ifaces[0].speed
        util = (current / speed) * 100
        evt.summary = "Interface Utilization At %3.1f%%" % (util,)

More Like This

  • Retrieving data ...

Legend

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