Report scheduler
The scheduler can periodically generate PDF reports, CSV inventories or CSV export files. Besides sending the generated output per e-mail, a shell command can be invoked after file generation. The tag %s is used to refer to the file name.
To run a report, either select Generate Report from the report dropdown menu or create a scheduler which creates the report regularly. A scheduler can be added below any group by selecting Add Scheduler from the dropdown menu of the group.
Give it a name, then browse for the report object and choose it from the dropdown list. The data interval, duration, frequency and output filename can be configured.
In the following example, a CSV data export was chosen as report:
Here is an example of a scheduler for a PDF report. PDF schedulers do not have the Data interval parameter choice available:
For data interval, duration and schedule, there are many options to choose from. The following screenshot shows the available schedule options:
The Certain times per day option for schedules allows setting up to 24 fixed times of day, when the report will be generated. When selecting Several times per day, the frequency can be given in hours and/or minutes. When selecting Weekly, the weekday can be selected. When selecting Monthly, Quarterly, Half-yearly or Yearly, the day of month can be configured.
The filename should not contain any special characters. Choose if the SKOOR Engine should overwrite or keep old reports. To keep old reports, select Auto enumerate from the dropdown below the file name. Old reports will be deleted automatically after a certain time.
By clicking the + in the Recipients section, one can choose an already defined SKOOR Engine user or add any name and e-mail address. There can be more than one recipient. It is possible to run a shell command after the creation of the report, e.g. to copy the report to a web server as a reference.
Click Schedule now in the scheduler drop down to run it and have the report generated:
Scheduler states:
State | Description |
---|---|
Undefined | Not run yet |
OK | Scheduled successfully |
Warning | Configuration error (invalid report, file missing etc.) |
Major | An error occurred during generation |
A scheduler can be stopped and started and also features a state, so one can differentiate between successful, faulty and stopped report schedulers.
Information on the scheduler state in the detail view:
Stopping and starting a scheduler requires execution permission within the specific path
During maintenance, when an object is in state Maintenance Ok or Maintenance Major, the execution of schedulers is stopped
Send reports in HTML e-mail format
Standard report e-mails are sent in plain text. If HTML formatted mails are preferred, this can be achieved by changing the mail layout property to a HTML template. There is a predefined template available which should be fine as a starting point. If the formatting needs to be changed, the same template can be copied, edited and added to the templates again to make it available in the dropdown list.
In the SKOOR Engine Admin section click Templates / Display in the dropdown menu:
Download the mail-template-report.html template if a new template shoud be configured:
The tags available for the configuration are described inside the template. After the required changes are applied, it should be saved with a different, meaningful name before adding it again to the templates folder using Templates / Upload from the dropdown menu.
Configure e-mail sender and URL
The predefined e-mail footer contains links to the SKOOR Engine as well as the an e-mail sender address. The following parameter must be set in the SKOOR Engine configurration on the OS:
/etc/opt/eranger/eranger-report.cfg
mkmail_source = sender@abc.com
/etc/opt/eranger/eranger-server.cfg
ui_url = https://myskoorengine.com
Please change the e-mail address and URL to the values appropriate for your installation. After that, the report engine must be restartet. Please run the following commad with a privileged user:
RedHat / CentOS 7:
systemctl restart eranger-report
RedHat / CentOS 6:
service eranger-report restart