By default, all reports run on demand, presenting information in the browser interface when you run the report. You can also schedule a report to be run using the reportmail command line tool. You can select a report to generate and email its output to a list of recipients. Ensure that an SMTP server is configured for your environment.
- Log in to the Resource Manager browser interface and click REPORTS.
- Take note of the report name you want to schedule and the folder it is in. You will need this information later in this procedure. For example, MAC Addresses report in the Device Reports folder.
- Log in to the Control Center master host as a user with serviced CLI privileges.
Adapt the following command for your environment:
serviced service run zope reportmail run -u "http://localhost:8080/zport/dmd/Reports/FolderName/ReportName" -U user -p password -a emailaddress -f emailaddressThe URL must use localhost:8080. Use %20 for a space in the URL. A more real-world example:
serviced service run zope reportmail run -u "http://localhost:8080/zport/dmd/Reports/Device%20Reports/MAC%20Addresses" -U admin -p Pa$$w@rd -a firstname.lastname@example.org -f email@example.comThe following table lists all the arguments available for the reportmail command:
Reportmail command line arguments Argument Description -u URL, --url=URL Uniform Resource Locator of the report to send. This can also be the URL of any other page in the system. Use localhost:8080 as the domain. Use %20 for the space character. -U USER, --user=USER User to log in to the system. This user must have permission to view the supplied URL. -p PASSWD, --passwd=PASSWD Password to log in to the system. -a ADDRESS, --address=ADDRESS Email address for report delivery (may be given more than once). Default value comes from the user's profile. -s SUBJECT, --subject=SUBJECT Subject line for email message. Default value is the title of the page. -f FROMADDRESS, --from=FROMADDRESS Origination address for the email being sent. -d DIV, --div=DIV DIV to extract from the HTML at URL. The default value is contentPane, which works for all default reports.