Skip navigation
1 2 Previous Next 28227 Views 25 Replies Latest reply: Jun 7, 2012 3:26 AM by Giovanni Maffia RSS
Tijmen van den Brink ZenossMaster 324 posts since
Jan 7, 2008
Currently Being Moderated

Dec 10, 2008 11:28 AM

Interested in an "event transform" section?

I was wondering if there are people interested in a "event transform" section?
  • Matt Ray Rank: Zen Master 2,484 posts since
    Apr 5, 2008
    Currently Being Moderated
    1. Dec 10, 2008 11:50 AM (in response to Tijmen van den Brink)
    Interested in an "event transform" section?
    Not sure I follow, do you mean as a separate forum? I'm always open
    to suggestions.

    Thanks,
    Matt Ray
    Zenoss Community Manager
    community.zenoss.com
    mray@zenoss.com



    On Dec 10, 2008, at 10:28 AM, gentux31 wrote:

     

     

    I was wondering if there are people interested in a "event
    transform" section?







    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users


    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • Sartuche24 Rank: Green Belt 188 posts since
    Sep 21, 2007
    I agree I have some Event Transforms I'd like to share. I have a nice one that takes the alert for high utilization and converts it it a nice readable format showing the Utilization in Gbps, Mbps, Kbps or even bps plus a percentage.
  • jbaird Rank: Green Belt 166 posts since
    Sep 18, 2007
    Currently Being Moderated
    4. Dec 10, 2008 5:46 PM (in response to Sartuche24)
    RE: Interested in an "event transform" section?
    I would definitely be interested in this.
  • jbaird Rank: Green Belt 166 posts since
    Sep 18, 2007
    Currently Being Moderated
    5. Dec 10, 2008 5:46 PM (in response to jbaird)
    RE: Interested in an "event transform" section?
    One that takes the event for high disk usage and converts it into MB would be nice as well.
  • Sartuche24 Rank: Green Belt 188 posts since
    Sep 21, 2007
    Currently Being Moderated
    6. Dec 11, 2008 6:54 AM (in response to jbaird)
    RE: Interested in an "event transform" section?
    Here's what I have for High Utilization for an Interface. Fixed the transform to print Mbps instead of Kbps.

    # Use in Perf/Interface
    #Transform interface usage into readable format
    import re
    
    fs_id = device.prepId(evt.component)
    for f in device.os.interfaces():
        if f.id != fs_id: continue
    
        # Extract the percent and utilization from the summary
        m = re.search("threshold of [^:]+: current value ([\d\.]+)", evt.message)
        if not m: continue
        currentusage = (float(m.group(1))) * 8
        p = (currentusage / f.speed) * 100
        evtKey = evt.eventKey
        
        # Whether Input or Output Traffic
        if evtKey == "ifInOctets_ifInOctets|high utilization":
            evtNewKey = "Input"
        elif evtKey == "ifOutOctets_ifOutOctets|high utilization":
            evtNewKey = "Output"
    
    
        # Check the speed to determine the appropriate conversion
        # Gbps utilization
        if currentusage > 1000000000:
            Usage = currentusage / 1000000000
            evt.summary = "High " + evtNewKey + " Utilization: Currently (%3.2f Gbps) or %3.2f%% is being used." %  (Usage, p)
    
        # Mbps utilization
        elif currentusage > 1000000:
            Usage = currentusage / 1000000
            evt.summary = "High " + evtNewKey + " Utilization: Currently (%3.2f Mbps) or %3.2f%%  is being used." %  (Usage, p)
    
        # Kbps utilization
        elif currentusage > 1000:
            Usage = currentusage / 1000
            evt.summary = "High " + evtNewKey + " Utilization: Currently (%3.2f Kbps) or %3.2f%%  is being used." %  (Usage, p)
    
        # bps  utilization
        elif currentusage < 1000:
            Usage = currentusage
            evt.summary = "High " + evtNewKey + " Utilization: Currently (%3.2f bps) or %3.2f%%  is being used." %  (Usage, p)
        break


    This transforms the summary from:
    threshold of high utilization exceeded: current value 13763.32
    To This:
    High Input Utilization: Currently (246.84 Kbps) or 192.84% is being used.
  • Matt Ray Rank: Zen Master 2,484 posts since
    Apr 5, 2008
    Currently Being Moderated
    7. Dec 11, 2008 5:14 PM (in response to Sartuche24)
    Interested in an "event transform" section?
    I created this wiki page with the examples from this thread. Feel
    free to add more examples, or more pages and link to them.

    http://www.zenoss.com/community/wiki/EventTransforms

    Thanks,
    Matt Ray
    Zenoss Community Manager
    community.zenoss.com
    mray@zenoss.com

    _______________________________________________
    zenoss-users mailing list
    zenoss-users@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-users
  • mloven Rank: White Belt 29 posts since
    May 28, 2008
    Currently Being Moderated
    8. Dec 17, 2008 4:22 PM (in response to Matt Ray)
    RE: Interested in an "event transform" section?
    This is a great idea! I was just thinking this a couple days ago....
  • artifact Rank: Green Belt 303 posts since
    Mar 11, 2008
    Currently Being Moderated
    9. Dec 30, 2008 7:50 PM (in response to mloven)
    RE: Interested in an "event transform" section?

    "Sartuche24" wrote:

     

    Here's what I have for High Utilization for an Interface.

    import re
    
    fs_id = device.prepId(evt.component)
    for f in device.os.interfaces():
        if f.id != fs_id: continue
    
        # Extract the percent and utilization from the summary
        m = re.search("threshold of [^:]+: current value ([\d\.]+)", evt.message)
        if not m: continue
        currentusage = (float(m.group(1))) * 8
        p = (currentusage / f.speed) * 100
        evtKey = evt.eventKey
        
        # Whether Input or Output Traffic
        if evtKey == "ifInOctets_ifInOctets|high utilization":
            evtNewKey = "Input"
        elif evtKey == "ifOutOctets_ifOutOctets|high utilization":
            evtNewKey = "Output"
    
    
        # Check the speed to determine the appropriate conversion
        # Gbps utilization
        if currentusage > 1000000000:
            Usage = currentusage / 1000000000
            evt.summary = "High " + evtNewKey + " Utilization: Currently (%3.2f Gbps) or %3.2f%% is being used." %  (Usage, p)
    
        # Mbps utilization
        elif currentusage > 1000000:
            Usage = currentusage / 1000000
            evt.summary = "High " + evtNewKey + " Utilization: Currently (%3.2f Kbps) or %3.2f%%  is being used." %  (Usage, p)
    
        # Kbps utilization
        elif currentusage > 1000:
            Usage = currentusage / 1000
            evt.summary = "High " + evtNewKey + " Utilization: Currently (%3.2f Kbps) or %3.2f%%  is being used." %  (Usage, p)
    
        # bps  utilization
        elif currentusage < 1000:
            Usage = currentusage
            evt.summary = "High " + evtNewKey + " Utilization: Currently (%3.2f bps) or %3.2f%%  is being used." %  (Usage, p)
        break


    This transforms the summary from:
    threshold of high utilization exceeded: current value 13763.32
    To This:
    High Input Utilization: Currently (246.84 Kbps) or 192.84% is being used.



    I cannot get this to work!! The message simply will not transform, I have no idea what I'm doing wrong or how to troubleshoot it.. can anyone help?
  • Sartuche24 Rank: Green Belt 188 posts since
    Sep 21, 2007
    Currently Being Moderated
    10. Dec 31, 2008 10:30 AM (in response to artifact)
    RE: Interested in an "event transform" section?
    Where are you putting the transform at in Zenoss.

    Go to Perf/Interface
    Click on the down arrow and under one of the options should have for transform.

    Paste the code into the transform box and save. Let me know if this works.
  • artifact Rank: Green Belt 303 posts since
    Mar 11, 2008
    Currently Being Moderated
    11. Dec 31, 2008 12:42 PM (in response to Sartuche24)
    RE: Interested in an "event transform" section?
    Yeah, Thanks... I found that last night, and got it working. I was trying transform a specific event class mapping rather than the whole class. I also had to change the name of the "# Whether Input or Output Traffic" section to match my template name. Now it works perfectly! 8)
  • Sartuche24 Rank: Green Belt 188 posts since
    Sep 21, 2007
    Currently Being Moderated
    12. Dec 31, 2008 1:02 PM (in response to artifact)
    RE: Interested in an "event transform" section?
    Good to see it's working.
  • jcurry ZenossMaster 1,021 posts since
    Apr 15, 2008
    Currently Being Moderated
    13. Jan 5, 2009 7:35 AM (in response to Sartuche24)
    RE: Interested in an "event transform" section?
    The wiki page looks useful but a couple of lines of instruction would be helpful on how to add to the page. I can see how to add a comment but not sure how to modify the page to add to the bottom (rather than just a comment)??

    Cheers,
    Jane
  • jcurry ZenossMaster 1,021 posts since
    Apr 15, 2008
    Currently Being Moderated
    14. Jan 5, 2009 7:41 AM (in response to jcurry)
    RE: Interested in an "event transform" section?
    I have been building a 2-3 day workshop on Zenoss event management, including lots of transform examples. I am trying to gauge interest in this offering. Please contact me if you would be interested in attending. I will try and post the Table of Contents to the Event Transform wiki page when I have worked out how to do that!

    Cheers,
    Jane
1 2 Previous Next

More Like This

  • Retrieving data ...