Notifications configuration
Email incident notifications
Currently, Platform Monitor supports sending notifications to email with the following types of notifications:
- Incident is created
- Incident-updated
- Component status changed
Out-of-the-box configuration
The notifications.yml file is provided in the package.
Notifications are disabled by default in configuration.
Here is the config with properties included by default. Enable the notifications in the configuration file to start receiving notifications 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
Enable notifications to email
- To enable notifications, find the
notifications.ymlfile in the package and set theenabledproperty totrue.
notifications:
enabled: true
sender: <sender@yourdomain.com>
- Configure the following SMTP properties in the file to start receiving notifications to your email.
- spring.mail.username: login user of the SMTP server
- spring.mail.password: login password of the SMTP server
- spring.mail.host: SMTP server host, for example,
smtp.example.com - spring.mail.port: SMTP server port
spring:
mail:
host: <smtp.host.name>
port: <smtp.port>
username: <user>
password: <password>
- To receive the email, set a subscription by adding
to: <user1@yourdomain.com>under thetopicslist inside notifications. 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 a public URL. During the installation, PM doesn't know about the public URL required to create a correct link to Platform Monitor, which is used for email.
Platform Monitor uses the Ethernet interface host by default. It does 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.
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--