Configuring an Alert¶
An alert is an email message sent by Rulex Factory to a pre-defined list of recipients when an issue arises during the computation of your flows.
To configure a new alert you need to add it from the Alerts tab located in the left-hand panel of the stage window.
Attention
Rulex Platform Mail server must be configured to be able to send email alerts. For more information on how to configure Rulex Platform Mail Server, see page: Platform Mail Server.
Alerts can be configured to send emails when specific tasks, or the entire flow, fulfill specific requirements. This can only be done if requirements are set previously in the alert functions.
To configure a single alert you need to provide the following information in the Alert panel:
Option name |
Parametric name |
Description |
---|---|---|
Alert name |
The unique name assigned to the alert |
|
Event type |
type |
|
Severity |
severity |
|
Condition (only for Task rows event type) |
thr_op |
From this drop-down list, the user can select different operators (<, >, <=, >=, =) to compare the number of rows defined in the Rows spin box with the number of rows of the corresponding dataset. Email alerts will be sent if the condition is true. |
Threshold/Rows (only for Task duration/Task rows event types) |
thr_val |
The threshold value for Task duration or row value for Task rows can be set in their corresponding spin boxes. In case of task rows event type, this number is compared using the operator selected in Condition field. |
Include computation warnings (only for Error raised event type) |
warning |
This boolean option (true/false) defines whether the alert message should also be triggered in case of warnings in task computation or to only be triggered for errors. |
Selected Tasks (semicolon separated) |
tasks (for tasks) |
The names of the tasks or the task categories where the alert is active. You can select them by clicking on the button at the right end of the text bars. Multiple tasks and categories are separated by semicolon. |
Recipients for email alert (comma separated) |
recipients |
The recipients of the email alert are displayed here. You can add more than one email address, but it needs to be separated by a comma from the previous one. |
A new alert can then be added following the steps below:
Procedure
Click on the Alerts tab at the left-hand side of the stage window.
Click on the plus icon at the top right side of the left panel.
Enter a unique name for the newly created alert in the dialog box. All the alerts in a flow must have different names. Names are case-sensitive.
Configure your alert in the newly opened Alert panel and provide all the information listed in the table above.
Click on Save button to add the new alert or on Exit to discard any editing.
Tip
In the upper left side of the Alert panel a Disable checkbox allows the user to disable the newly created alert. This could be useful if you are creating alerts for the production environment, and you do not want to consider these during development phase. The parametric name for this entry is enabled and accepts a boolean value (true/false). This binary value is either true if the alert is currently active or it is false if the alert is disabled.
Parametrizing an Alert¶
The main advantage of Rulex Platform is its dual nature: a self-code and user-friendly interface and an actual coding language behind the Platform’s GUI (the GOLD language). This latter aspect of the software allows users to parametrize their configurations, and thus provides greater flexibility.
Parametrizing means touching directly the underlying GOLD code using Variables to customize your solution accordingly to the needs of your specific flow, computation, environment.
On the Task option presentation page, the parametric visualization of tasks has been addressed and alerts can also be parametrized similarly.
In the Alert panel in the upper right side there is the icon which enables the user to switch to the parametric alert configuration.
In this visualization the alert is shown as a GOLD dictionary (a key/value pair) where to any parametric name string is associated a parametric value that could be a string/boolean or number type according to the information provided.
Once changes have been made, users can return to standard alert configuration by clicking on the cross-shaped Standard alert icon located in the bottom left-hand corner of the parametric Alert panel.
To parametrize an alert, follow the guidelines listed below:
Procedure
Click on the Alerts tab at the left-hand side of the stage window.
Click on the plus icon at the top right side of the left panel.
Enter a unique name for the newly created alert in the dialog box. All the alerts in a flow must have different names. Names are case-sensitive.
Click on the icon in the upper right side of the Alert panel.
Write all the information you want to parametrize in the created alert as GOLD code after the
=
symbol in the corresponding code block.Click on the cross-shaped Standard alert icon located at the bottom left-hand of the Alert panel to apply your changes.
Now you see your changed alert configuration also in the Standard alert configuration view.
Click on Save button to add the new alert or on Exit to discard any editing.
Email Alert Format¶
The format of the email sent by the alert has a fixed structure and is related to its severity.
The sender as well as the mail server sending the mail are defined in the Mail server configuration.
The subject of the email message is structured in the following way: [<flow name> - <severity>] Rulex Alert: <event type>
.
The event type written in the email subject slightly differs from the label used in the configuration and is mapped as follows:
Task started - Computation started
Task ended - Computation ended
Error raised - Error/Warning check on all tasks (in case of error or warning reporting)
Task duration - Computation duration threshold reached
Task rows - Computation rows threshold reached
The body of the mail is filled with a table summarizing the notice sent:
Alert name
Alert type - filled with the event type name as in the email subject
Severity
Target process - filled with the flow name
Computation type - type of computation normal/in-memory/in-memory source saving
Description
Triggered by task - filled with task name which sent the alert
Trigger time - filled with the sending time in UTC