Notifications v8
PEM can send a notification or execute a script if an alert is triggered or cleared. You can send notifications using the following options:
- SMTP
- Webhooks
- SNMP
- Nagios
Use the Notification tab to specify PEM behavior when an alert is raised.
SMTP
You must configure the PEM server to use an SMTP server to deliver email before PEM can send email notifications.
Creating an email group
PEM monitors your system for conditions that require attention. You can use an email group to specify the email addresses of users for the server to notify if current values deviate from threshold values specified in an alert definition. An email group can notify multiple users or target specific users during the time periods you specify.
Use the Email Groups tab to configure groups of SMTP email recipients. To open the Email Groups tab, in the PEM client, select Management > Manage Alerts. When the Manage Alerts tab opens, select Email Groups from the Quick Links toolbar.
The Email Groups tab displays a list of the currently defined email groups. To modify an existing group, select a group name and select Edit at the far left end of the row.
To define a new email group, select the plus sign (+) in the upper-right corner of the Email Groups table. Use the Email Groups dialog box to define an email group and its members.
Each row in the email group definition associates a set of email addresses with a specific time period. When an alert is triggered, the server evaluates the times specified in each row and sends the message to those group members whose definitions are associated with the time that the alert triggered.
Provide a name for the email group in the Group Name field.
To open the Options tab, select the plus sign (+) in the group members table.
Add the member addresses to receive notifications for the time period specified:
- Enter a comma-delimited list of recipient addresses in the Reply to Addresses field.
- Enter a comma-delimited list of addresses to receive a copy of the email in the CC Addresses field.
- Enter a comma-delimited list of addresses to receive a copy of the email without the knowledge of other recipients in the Bcc Addresses field.
- Enter the email address to send the messages from in the From Address field.
- Use the Subject prefix field to provide a message to add to the start of each subject line when a notification is sent.
- Use the From Time and To Time selectors to specify the time range for notifications to the group members that are identified on this row. Provide these values in the locale of the PEM client host. The PEM server translates the time into other time zones as required.
Select Add to add a row to the table, and specify another time period and the email addresses to notify during those hours.
When you've finished defining the email group, select Save.
After creating the email group, you can use the Manage Alerts tab to set up the notification details for an alert to direct notifications to the group.
Deleting an email group
To delete an email group, in the Email Group table, select the name of the group and select Delete, located to the left of the group name.
The group name appears in the Email Group table in red. Select Save to permanently remove the group from the table.
Webhook
You must configure the PEM Server to use webhooks to receive notification of alert events on threshold value violations in your configured applications.
Creating a webhook
PEM monitors your system for conditions that require user attention. You can use a webhook to create the endpoints to receive a notification if current values deviate from threshold values specified in an alert definition. Based on the events triggered, PEM sends a notification to multiple webhook endpoints or to specific target webhook endpoints.
Use the Webhooks tab to configure endpoint recipients. To open the Webhooks tab, select Management > Manage Alerts. From the Manage Alerts tab, on the Quick Links toolbar, select Webhooks.
The Webhooks tab displays a list of the currently defined recipient applications as endpoints. Select an endpoint and select Edit at the far left end of the row to modify an existing endpoint.
To define a new webhook, select the plus sign (+) in the upper-right corner of the table. You can then use the General tab to define the basic details of the webhook:
- Provide a name for the webhook in the Name field.
- Specify a webhook URL to delever all the notifications to in the URL field.
- Set the request method type used to make the call in the Request Method field: POST or PUT.
- By default, webhooks are enabled. To disable a webhook, set Enable? to No.
Note
The Enable? setting works only if the enable_webhook
parameter is set to true
in the agent.cfg
file. By default, the enable_webhook
parameter is set to true
only for the agent running on the PEM server host. For all other agents running on other hosts, you need to set it to true
manually.
Defining webhook SSL configurations
You can define the webhook SSL parameters in the respective agent configuration file or registry in Windows. You can find the list of webhook SSL parameters in PEM agent configuration parameters. If you add or remove any of the agent configuration parameters, you must restart the agent to apply them.
- On Windows systems, PEM registry entries for webhooks are located in
HKEY_LOCAL_MACHINE\Software\EnterpriseDB\PEM\agent\WEBHOOK
. - On Linux systems, PEM configuration options for webhooks are stored in the
agent.cfg file
, located by default in/usr/edb/pem/agent/etc
.
Use the HTTP Headers tab to define the header parameters to pass while calling the webhook endpoints:
- Specify all the values as a key and value pair.
- Specify a key parameter in the Key field and a value in the Value field.
- To add HTTP headers, select the plus sign (+) in the upper-right corner of the HTTP Headers table.
- To delete HTTP headers, select Delete to the left of Key. The header remains in the list but in strike-through font. Select Save to permanently delete the headers.
- To edit the HTTP headers, select Edit to the left of Key.
Use the Payload tab to define the JSON data to send to the endpoint when an alert is triggered:
Type specifies data to send in the format type, that is, JSON.
Use Template to configure JSON data sent to endpoints. In the template, you can use placeholders for the following:
%AlertID%
— The id of the triggered alert.%AlertName%
— The name of the triggered alert.%ObjectName%
— The name of the server or agent on which the alert was triggered.%ObjectType%
— The type on which the alert was generated.%ThresholdValue%
— The threshold value reached by the metric when the alert triggered.%CurrentValue%
— The current value of the metric that triggered the alert.%CurrentState%
— The current state of the alert.%OldState%
— The previous state of the alert.%AlertRaisedTime%
— The time that the alert was raised or the most recent time that the alert state changed.%AgentID%
— The id of the agent by which the alert was generated.%AgentName%
— The name of the agent by which the alert was generated.%ServerID%
— The id of the server on which the alert was generated.%ServerName%
— The name of the server on which the alert was generated.%ServerIP%
— The ip or address of the server on which the alert was generated.%ServerPort%
— The the port of the server on which the alert was generated.%DatabaseName%
— The name of the database on which the alert was generated.%SchemaName%
— The name of the schema on which the alert was generated.%PackageName%