TECHZEN Zenoss User Community ARCHIVE  

Scheduled performance reports - report is sent without any device information, p ...

Subject: Scheduled performance reports - report is sent without any device information, please help?
Author: [Not Specified]
Posted: 2015-03-31 17:53

Hi,

This post describes exactly what I am trying to figure out: http://www.zenoss.org/forum/616

To quote:

Right. I'm not getting any data in the reports.

I just get back:
Root Organizer: [/Devices \/] Device Filter:
Start Date: 03/19/2014 [select] End Date: 03/26/2014 [select]
Summary Type: [Average \/]
[Generate]

CPU Utilization

Device
Load Avg
% Util

[export all]

It looks as if the report template is being sent without the report being ran. In the GUI I can browse to the report, click generate, and see info I want to be included in the email. I'm hopefully overlooking something really obvious but I can't seem to figure it out.

Any suggestions would be much appreciated!

Zenoss Core 4.2.5

This is the script I am using, still no luck.

#!/bin/sh
REPORTS_URL=http://X.X.X.X:8080/zport/dmd/reports#reporttree:.zport.dmd.Reports

/opt/zenoss/bin/reportmail --user=***** --passwd=***** --from="emailaddress" --address="emailaddress" --subject="Zenoss Filesystem Utilization Report" --url="$REPORTS_URL.Performance Reports.Filesystem Util Report"

The result is an email that has the report template and no device information, and two attachments called 'noname'.



Subject: I poked around at the
Author: [Not Specified]
Posted: 2015-04-07 10:56

I poked around at the reportmail code ($ZENHOME/Products/ZenReports/ReportMail.py) and it doesn't look like it handles report types where a form submission is required, e.g. the Performance Report category. Try using your code there with a Device Report and see if you get results.

That being said, what can you do You can craft your own form submission and use curl to pull down your report as a CSV, then format it yourself. For example in perl...

my @options;
push @options, qq(-d "DeviceClass=/Server");
push @options, qq(-d "System=$system") if ($system); #e.g. /zport/dmd/Systems/TESTSYSTEM
push @options, qq(-d "DeviceGroup=$group") if ($group); #e.g. /zport/dmd/Groups/TESTGROUP
push @options, qq(-d "Location=/");
push @options, qq(-d "device=");
push @options, qq(-d "severity=4");
push @options, qq(-d "startDate=$sd"); #start date string
push @options, qq(-d "endDate=$ed"); #end date string
push @options, qq(-d "eventClass=/Status/Ping");
push @options, qq(-d "generate=Generate");
push @options, qq(-d "doExport=export%20all"); #export as CSV
my $options=join (' ',@options);
my $report_type="Performance%20Reports/Availability%20Report";
my $cmd = qq(curl -s -u "$ZAPIUSER:$ZAPIPASS" -X POST $options "$ZENBASE/zport/dmd/Reports/$report_type");
my $output = qx($cmd);
print $output;



< Previous
How read the CPU Graphs on Zenoss
  Next
Beyond monitoring?
>