Skip navigation
4389 Views 6 Replies Latest reply: Dec 5, 2012 10:13 PM by linuchis RSS
joanypony Rank: Green Belt 114 posts since
Mar 7, 2012
Currently Being Moderated

Apr 26, 2012 8:54 AM

Emailing Customized Availability Reports

Hi All,

 

I know how to do the generic emailing of the default availability report.

 

reportmail -U blah -p blah -u http://zenoss.domain.com:8080/zport/dmd/reports#report:.zport.dmd.Reports.Performance%20Reports.Availability%20Report

 

What I want to do, is to send an email report every morning of the availibility of the /status/web event class. The default Zenoss availability report measures /status/ping.

How/where can I consistantly pull the same data and make it email-able? It doesn't have to use reportmail but I need to get this info by email to the boss every morning..

 

Any help/suggestions really appreciated..

 

Regards,

Joan

  • dpetzel Rank: Brown Belt 1,141 posts since
    Oct 17, 2010
    Currently Being Moderated
    1. Apr 26, 2012 7:21 PM (in response to joanypony)
    Re: Emailing Customized Availability Reports

    You can use a DMD script to deliver pretty much whatever you want using cron and python's internal email libraries.

     

    I'm not exactly sure without digging a little deeper what options you have on event data in status/web. I've only done tabularized results of RRD data, but I can't see why you wouldnt be able to get the data you are after in DMD.

  • dpetzel Rank: Brown Belt 1,141 posts since
    Oct 17, 2010
    Currently Being Moderated
    3. May 15, 2012 9:58 PM (in response to joanypony)
    Re: Emailing Customized Availability Reports

    I'd do something like this so you can list the range as command line args

    #Get Input Arguments

    parser = OptionParser()

    parser.add_option("-s", "--start-time", dest="startTime",

                      help="Set Start time %H:%M:%S", metavar="StartTime")

    parser.add_option("-e", "--end-time", dest="endTime", default="",

                      help="Set End time %H:%M:%S", metavar="EndTime")

    parser.add_option("-d", "--date", dest="reportDate", default="",

                      help="Set report date MM/DD/YYYY. Can't span multiple days", metavar="ReportDate")

     

    We have some internal scripts that we this with for providing reporting data from RRD files. I know your looking at events, so its not apples to apples, but perhaps some of the items inthe script might be helpful. You could basically swap out the main loop which handles RRD data and replace it with some event management code

     

    I had to remove all the internal references and make it 'shareable', so the code exactly as is might not work 100%, but I hope it provides you with enough information to give you some ideas

    Attachments:
  • linuchis Rank: White Belt 9 posts since
    Dec 5, 2012
    Currently Being Moderated
    6. Dec 5, 2012 10:13 PM (in response to joanypony)
    Re: Emailing Customized Availability Reports

    Hey!!

     

    I´m new on zenoss core 4.2 and I need to export data from graphs reports so I think I need a script to extract data from the rrd files but I don´t know how to do it, so do you have any idea about how to do it??

     

    I have checked this link http://docs.huihoo.com/zenoss/admin-guide/2.4.2/ch12s04.html#d4e4995 but I don´t understand anything.

     

    What I need is export data from reports that I created to an excel file

     

    Regards!!

More Like This

  • Retrieving data ...

Legend

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