Zenoss Core includes the
reportmail command in
$ZENHOME/bin that enables us to send any report, including custom device reports, via e-mail. No graphical interface is available which means that we must work from the command line as the zenoss user.
We need to specify the URL of the report, the username/password for a user, and a from address for the e-mail. Run the command
reportmail --help to get a full list of options.
To get the URL of the report, open the report you want to mail from the Zenoss UI and copy the URL from the browser. Using the Uptime Report we created earlier in this chapter, I would use the command:
reportmail -U userName -p password \ -u http://localhost:8080/zport/dmd/reports#reporttree:.zport.dmd.Reports.Custom%20Device%20Reports.Uptime ...