Discussion:
reportmail sending empty emails (Zenoss 3.2.1)
jshardlow
2012-01-27 10:22:07 UTC
Permalink
jshardlow [http://community.zenoss.org/people/jshardlow] created the discussion

"reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/63961#63961

--------------------------------------------------------------
Hi,

I've just upgraded a test box from 2.5.2 to 3.2.1 and have discovered the hard way that the URL structure has changed and as a result my script built round reportmail doesn't work any more. I think I've got the new URL syntax right but I'm getting blank emails, whereas before I would get a .csv .

Zenoss 2.x:
http://zenoss:8080/zport/dmd/Reports/Event%20Reports/All%20EventClasses?doExport

Zenoss 3.x:
http://zenoss:8080/zport/dmd/reports#reports:.zport.dmd.Reports.Event%20Reports.All%20EventClasses

I've had a look round the Admin Guide, but in their example (below) they seemed to have changed the REPORTS_URL entry to reflect the new layout, but I'm pretty sure that the rest of it in --url is still the old layout:

#!/bin/sh
REPORTS_URL=http://public-demo.zenoss.com/zport/dmd/reports#reports:.zport.dmd.Reports.Performance%20Reports.


$ZENHOME/bin/reportmail \
--user=admin \
--passwd=PASSWD \
--from="***@example.com" \
--address="***@example.com" \
--subject="Zenoss: Availability Report" \
--url="$REPORTS_URL/Performance Reports/Availability Report"


Any ideas anyone? Thanks in advance!
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/63961#63961]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-02-02 11:53:39 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64127#64127

--------------------------------------------------------------
jshardlow:

In Zenoss v3.x and v4.x report URL's aren't straight forward URI anymore (despite the fact that its annoying).

Try the following:
#!/bin/sh
REPORTS_URL=" http://public-demo.zenoss.com/zport/dmd/reports#reports:.zport.dmd.Reports http://public-demo.zenoss.com/zport/dmd/reports#reports:.zport.dmd.Reports"


$ZENHOME/bin/reportmail \
--user=admin \
--passwd=PASSWD \
--from=" mailto:***@example.com ***@example.com" \
--address=" mailto:***@example.com ***@example.com" \
--subject="Zenoss: Availability Report" \
--url="$REPORTS_URL.Performance%20Reports.Availability%20Report"

Best,
--Shane (Hackman238)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64127#64127]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jshardlow
2012-02-02 12:29:01 UTC
Permalink
jshardlow [http://community.zenoss.org/people/jshardlow] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64115#64115

--------------------------------------------------------------
Thanks, but with a full URL of the following I still get a blank email with no attatchment:

http://zenoss:8080/zport/dmd/reports#reports:.zport.dmd.Reports.Performance%20Reports.Availability%20Report
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64115#64115]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-02-02 14:49:04 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64120#64120

--------------------------------------------------------------
jshardlow:

Is it being run as the zenoss user?

--Shane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64120#64120]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-02-02 14:56:20 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64137#64137

--------------------------------------------------------------
jshardlow:

You can also try:
#!/bin/sh
REPORTS_URL="http://yourzenoss.net/zport/dmd/Reports"


$ZENHOME/bin/reportmail \
--user=admin \
--passwd=zenoss \
--from=" mailto:***@example.com ***@example.com" \
--address=" mailto:***@somewhere.com ***@somewhere.com" \
--subject="Zenoss: Availability Report" \
--url="$REPORTS_URL/Performance%20Reports/Availability%20Report"

This works on v4.1.1.

Best,
--Shane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64137#64137]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jshardlow
2012-02-02 15:02:33 UTC
Permalink
jshardlow [http://community.zenoss.org/people/jshardlow] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64140#64140

--------------------------------------------------------------
No joy there I'm afraid. Makes me wonder if something is broken in the reports.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64140#64140]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-02-02 15:04:45 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64142#64142

--------------------------------------------------------------
jshardlow:

Try running the report in Zenoss manually. If it takes a long time then reportmail is probably timing out and sending a blank result.

--Shane (Hackman238)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64142#64142]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jshardlow
2012-02-02 15:10:43 UTC
Permalink
jshardlow [http://community.zenoss.org/people/jshardlow] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64146#64146

--------------------------------------------------------------
Could be. Most reports seem to take about 3-4 seconds from click to populate. The box isn't the fastest, it's an old Dell 2650.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64146#64146]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-02-02 16:02:06 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64149#64149

--------------------------------------------------------------
jshardlow:

How long is it taking to run?

--shane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64149#64149]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jshardlow
2012-02-03 09:38:24 UTC
Permalink
jshardlow [http://community.zenoss.org/people/jshardlow] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64184#64184

--------------------------------------------------------------
Stats from running the script:

real
0m6.381s
user
0m5.258s
sys
0m0.789s
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64184#64184]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
luizzmizz
2012-02-03 09:43:19 UTC
Permalink
luizzmizz [http://community.zenoss.org/people/luizzmizz] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64185#64185

--------------------------------------------------------------
When this happens to me, it's because the report returned an error, which i can normally find on event.log.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64185#64185]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jshardlow
2012-02-03 10:27:39 UTC
Permalink
jshardlow [http://community.zenoss.org/people/jshardlow] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64189#64189

--------------------------------------------------------------
I viewed each report via GUI and then kept an eye on event.log, this is what it said:

------
2012-02-03T10:22:30 INFO PythonScripts Some of your Scripts have stale code cached.  Since Zope cannot use this
code, startup will be slightly slower until these Scripts are edited. You can automatically recompile all Scripts
that have this problem by visiting /manage_addProduct/PythonScripts/recompile of your server in a browser.
------
2012-02-03T10:23:16 WARNING OFS.Uninstalled Could not import class 'HttpMonitorDataSource' from module
'Products.HttpMonitor.datasources.HttpMonitorDataSource'


The HttpMonitor data source issue is related to a ZenPack issue I'm having on this box.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64189#64189]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
luizzmizz
2012-02-03 10:43:49 UTC
Permalink
luizzmizz [http://community.zenoss.org/people/luizzmizz] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64190#64190

--------------------------------------------------------------
I meant watching the log while sending via reportmail (because I understood you don't have any problems on GUI, only sending the report, isn't it?)
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64190#64190]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jshardlow
2012-02-03 10:46:06 UTC
Permalink
jshardlow [http://community.zenoss.org/people/jshardlow] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64191#64191

--------------------------------------------------------------
Oops sorry, I got the wrong end of the stick there. Nothing reported in event.log whilst I ran the script.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64191#64191]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
luizzmizz
2012-02-03 11:00:54 UTC
Permalink
luizzmizz [http://community.zenoss.org/people/luizzmizz] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64192#64192

--------------------------------------------------------------
My last try:

Look at the differences:
http://yourzenoss:8080/zport/dmd/reports# http://yourzenoss:8080/zport/dmd/reports#*reports*:.zport.dmd.Reports.Performance%20Reports.Availability%20Report
http://myzenoss:8080/zport/dmd/reports# http://myzenoss:8080/zport/dmd/reports#*reporttree*:.zport.dmd.Reports.Performance Reports.Availability Report

Using the #reports form... i get the same result as you, a fast and empty mail, as the URL doesn't exist and there's few work to do with that :) .
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64192#64192]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jshardlow
2012-02-03 11:08:22 UTC
Permalink
jshardlow [http://community.zenoss.org/people/jshardlow] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64193#64193

--------------------------------------------------------------
The problem with using reporttree is that I get an email full of HTML that resembles a webpage. What I'm really after is an attached .csv which is what I had working fine in 2.5.1. As an aside if I use reports (with spaces not %20) I still get a blank email.

Neither version threw anything up in event.log.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64193#64193]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Shane Scott
2012-02-03 15:27:37 UTC
Permalink
Shane Scott [http://community.zenoss.org/people/hackman238] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64201#64201

--------------------------------------------------------------
jshardlow:

That about covers the bases pretty well. Running short on ideas.

--Shane
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64201#64201]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jshardlow
2012-02-03 15:31:28 UTC
Permalink
jshardlow [http://community.zenoss.org/people/jshardlow] created the discussion

"Re: reportmail sending empty emails (Zenoss 3.2.1)"

To view the discussion, visit: http://community.zenoss.org/message/64202#64202

--------------------------------------------------------------
No problem, thanks for giving it a go. At least there are other people with the same problem, so hopefully a solution may appear at some point.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/64202#64202]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...