Email reporter - installation¶
The Email reporter basically consists of several modules:
- Plugin: CortexEngine plugin for configuring reports
- Scheduler: Python module for sending configured reports by email
Install the plugin in Remote admin¶
The desired CortexEngine instance must have a license for the plugin!
Uniplex required!
This plugin can only be used in the context of the Uniplex!
Tip: In the Starter edition and the User group edition, the Uniplex is already pre-installed.
This plugin is installed using the Remote admin.
Here's how it works: install plugin
The plugin must be activated for all desired users by selecting the corresponding permission.
Here's how it works: set user permissions
Plugin used in Uniplex¶
Activate and assign the plugin¶
After installation in the CortexEngine, the following steps activate the plugin in the Uniplex. Once the plugin has been assigned to a user, the corresponding button is available in the quick launch bar.
-
activate the plugin in one (or more) plugin template(s)
Here's how it works: activate a plugin under Plugin templates
-
open the Plugin templates
The button Add
is used to configure new entries and the button Edit
is used to configure existing entries.
-
select the desired template and activate the plugin Email reporter
In the dialog header, a template can be created with the button Add
and another template can be selected with the button Load template
. The template will be removed with the button Delete template
.
Parameters Meaning Note name meaningful name of the plugin template available plug-in buttons plugins available in the CortexEngine activate with activated plug-in buttons plugins that should be visible for users with this plugin template remove with
change order withand
-
-
assign the plugin template(s) to the desired users in the user administration
Here's how it works: assign the plugin to users
-
open the tab Templates under user administration
-
assign the desired plugin template to the user
-
click the button Save changes (or Cancel on the top right)
-
close the system settings
The button with the name of the plugin appears in the quick launch bar on the left.
-
Field and record type definitions¶
To be able to manage report configurations in Uniplex, its fields and record types are required.
- download and unzip the file
- import the field definitions (in file
!FId.json
) - import the record type definitions (in file
#Dst.ctxexp
)
Perform import separately
Fields and record types must be imported separately!
Here's how it works: importing field and record definitions
The import function is located at the bottom left in the system settings.
It opens the dialog Import configurations.
Scheduler¶
Python Version 3.11
The Scheduler module requires Python version 3.11 or higher!
The Scheduler is a Python-based module that realizes the sending of email reports.
It runs outside the CortexEngine at system level and can either be started manually on demand or regularly via CronJob.
Tip: Add $PATH
To simplify use, it is recommended to add the module to the system path:
- find installation location
- include in $PATH (e.g.
.zshrc
or.bashrc
)
Configuration¶
The configuration is carried out via emlrep.ini
, which is divided into the following categories.
Dataservice¶
To be able to read the reports for delivery, the scheduler requires access to the CortexEngine data inventory.
This access takes place via the Uniplex interface:
[DATASERVICE]
no_rec_found=Keine Datensaetze gefunden.
link=localhost:8888/Uniplex/updjsr.php
user=admin
password=admin
Parameters | Description |
---|---|
no_rec_found | requested response if no reports were found |
link | URL of the updjsr.php in a running Uniplex instance |
user | login user name of the linked Uniplex instance |
password | login password of the linked Uniplex instance |
Mailserver¶
A mail server is required for sending emails:
[MAILSRV]
hostname=mailserver.cortex-ag.com
user=cron-mailer@cortex-ag.com
passwd=password
from=Emailreport <no-reply@cortex-ag.com>
ssl=0
port=587
Parameters | Description |
---|---|
hostname | URL of the mail server |
user | login user name for mail server |
passwd | login password for mail server |
from | desired sender address |
ssl | Should SSL be used for the connection to the mail server? (0 = No, 1 = Yes) |
port | access port for mail server |
Administrator¶
Parameters | Description |
---|---|
error_emails | recipient address for administrative/debug emails |
debug | Should emails be sent to the error_emails recipients and not to the recipients defined in the reports? ('False' = No, 'True' = Yes) |
cron_interval | How often should the scheduler be executed? ('day' = 1x daily, 'hour' = 1x per hour) (*1) |
*1: Hour input in the plugin
If cron_interval = day
- i.e. delivery 1x per day - is configured, the hourly input is hidden in the plugin UI.
Configuration - web server¶
The web server that serves the desired instance of the CortexEngine requires the path to the emlrep.ini
file.
This is communicated to the web server in its httpd.ini
file: