Documentation forDatabase Performance Analyzer

Create webhook contacts for Slack or Teams notifications

Webhook contacts can be used to post alert notifications in a Slack or Teams channel. When you create a webhook contact, you can select it as a recipient when you define an alert.

You can also send alert notifications through email and send SNMP traps from DPA alerts.

  1. Create a webhook in the Slack or Teams channel that you want to send alert notifications to. Then copy the webhook URL.

    For more information about creating webhooks, see the Microsoft or Slack documentation.

  2. Log in to DPA using an account with administrator privileges.

  3. From the DPA menu in the upper-right corner, click Options.

  4. Under Administration > Users & Contacts, click Contact Management.
  5. On the Contact management page, click Create contact.

    If any contacts are selected, the Create contact button is not displayed.

  6. Under Contact type, select Slack or Teams.
  7. Enter a name to identify this contact and, optionally, a description.

  8. In the Address box, enter the webhook URL that you copied in step 1.

  9. To test the webhook URL, click Send test webhook. Then verify that a test notification from DPA was posted in the Slack or Teams channel.
  10. (Optional) Add the contact to one or more groups.

    1. Click the down-arrow under Assign contact to groups.

    2. Click a group name to select the group.

      The group is shown in the Assign contacts to groups box.

    3. Repeat these steps to add the contact to more groups.

  11. Click Create.

    The contact is added to the list of contacts.

Restrict where DPA can send Slack or Teams notifications

By default, DPA can sent alert notifications to any Slack or Teams webhook contact that you create. You can configure DPA to send notifications only to the webhook URLs that are allowed in the file.

  1. Open the following file in a text editor:


  2. Uncomment or add one or more lines to identify all allowed URLs:


    where allowedUrlPattern is the allowed URL or a regular expression that matches multiple allowed URLs.

  3. Save the file, and then restart DPA.

Throttling properties

DPA includes the following properties that affect the number of webhook notifications it can send in a given time period.

Property Description Default value
delayMS The minimum number of milliseconds between notifications. 1000
buffer.size The maximum number of notifications that DPA can store in memory while waiting to send them. If the buffer is full, additional webhook notifications are discarded. 3600
timeoutMS The number of milliseconds DPA waits for a response from Teams or Slack before resending the notification. 20000

To prevent denial of service (DOS) attacks, Slack and Teams also limit the number of messages that each channel can receive.

If DPA generates more notices than it can send, create multiple Slack or Teams channels to receive additional notifications. Then create multiple "profiles" in the file. Each profile identifies a URL pattern and specifies the throttling property values for notifications sent to URLs matching that pattern.

If the URL in a webhook contact does not match any of the URL patterns defined in the file, the default limits apply.

  1. Open the following file in a text editor:


  2. For each profile, add the following line to identify the profile and specify which webhook URLs it affects:



    • n is a number that identifies each profile. For example, the first profile would contain service.1 and the next would contain service.2.

    • UrlPattern is the URL that the properties in this profile apply to, or a regular expression that matches multiple URLs.

      Special characters in the regular expression must have two escape characters in front of them (//).

      The regular expression in the following example matches all Teams URLs:


      The regular expression in the following example matches all Slack URLs:


  3. Add the following lines to each profile:




  4. Save the file, and then restart DPA.