Notifications configuration
Email incident notifications
Currently Platform Monitor supports sending notifications to email with the following types of notifications:
Incident is created.
Incident is updated.
Component status is changed.
Out-of-the-box configuration of the notifications
Currently, the notifications.yml file provided in the package.
Notifications are disabled by default in configuration.
Here is the config with properties included by default. Simply enable the notifications in the configuration file to start receiving notification to the email.
notifications.yml
## Copy this file to notifications.yml and update variables
#
## enabled - Change to true in order to enable notifications
## sender - Address which will be used as a sender of all notifications
## to - List of recepients for notifications
## topics - List of events to receive
notifications.enabled: false
notifications.sender: admin@localhost
notifications.to: admin@localhost
notifications.topics:
- template: incident-created
- template: incident-updated
- template: component-updated
## host - SMTP server host. For instance `smtp.example.com`
## port - SMTP server port.
## user - Login user of the SMTP server.
## password - Login password of the SMTP server.
## protocol - Protocol used by the SMTP server.
spring.mail.host: localhost
spring.mail.port: 25
spring.mail.username:
spring.mail.password:
spring.mail.protocol: smtp
How to enable notifications to email?
Enable notifications
Find the notifications.yml file in the package and set property enabled to true.
notifications:
enabled: true
sender: <sender@yourdomain.com>
Configure SMTP settings to start receiving notifications to email
Configure the following properties to enable SMTP:
spring.mail.username: login user of the SMTP serverspring.mail.password: login password of the SMTP serverspring.mail.host: SMTP server host, for instance, smtp.example.comspring.mail.port: SMTP server port
spring:
mail:
host: <smtp.host.name>
port: <smtp.port>
username: <user>
password: <password>
Set subscription
To receive email set subscription by adding to: <user1@yourdomain.com> under the topics list inside notifications as per following sample:
comma
Use a comma if you require to set up notifications to several emails.
notifications:
enabled: true
sender: <sender@yourdomain.com>
topics:
- id: component-updated
to: <user1@yourdomain.com>,<user2@yourdomain.com>
- id: incident-created
to: <user1@yourdomain.com>,<user2@yourdomain.com>
Set public URL
During installation PM doesn't know about public URL.
Platform Monitor requireds public URL to create correct link to Platform Monitor which is used for email.
Platform Monitor uses ethernet interface host by default. Platform Monitor is doing a reverse lookup on the server's IP address using the naming service (DNS) configured in your O/S.
Set the public URL environment.agent.hostname property:
environment:
agent.hostname: your_public_url
Sample notification
This is a sample of generated email notitication about incident by Platform Monitor in the HTML format.
Example email
Thu, 14 Sep 2017 17:35:52 +0300 (MSK)
Date: Thu, 14 Sep 2017 17:35:52 +0300 (MSK)
From: admin@localhost
To: admin@localhost
Message-ID: <900441456.8.1505399752474@DESKTOP-QIMUDQQ>
Subject: DESKTOP-QIMUDQQ:RPA Hub Component checks passed Incident was
updated
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_6_1600327835.1505399752465"
------=_Part_6_1600327835.1505399752465
Content-Type: multipart/related;
boundary="----=_Part_7_1369761031.1505399752465"
------=_Part_7_1369761031.1505399752465
Content-Type: text/html;charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>
<p>Type of event: Incident updated</p>
<p>Name of the component: <span>RPA Hub</span></p>
<p>Incident status: <span>FIXED</span></p>
<p>New status of the component: <span>Performance Issues</span></p>
<p>Previous status of the component: <span>Operational</span></p>
<p>Incident message: <span>Component checks passed</span></p>
<p>Host of the component: <span>DESKTOP-QIMUDQQ</span></p>
<p>Namespace: <span></span></p>
<p><a href="http://your_public_url:10000/incidents?component=rpa.hub">Go to the Platform Monitor Components Incidents page to learn more via link </a></p>
<p>This notification was auto-generated by WorkFusion Platform Monitor.</p>
<p>Time of notification creation: <span>2017-09-14 17:35:52</span></p>
</body>
</html>
------=_Part_7_1369761031.1505399752465--
------=_Part_6_1600327835.1505399752465--