Scheduling reports

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.

To schedule a report using reportmail:
  1. Log in to the Resource Manager browser interface and click REPORTS.
  2. 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.
  3. Log in to the Control Center master host as a user with serviced CLI privileges.
  4. 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 emailaddress
    The 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 managers@example.com -f craig@example.com
    The 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.
    -c COMMENT, --comment=COMMENT Comment to include in the body of CSV reports. This is used only if the URL returns comma-separated value data. Most default reports can return CSV-formatted data by appending ?doExport to the end of the URL.