Integrating Webhooks in Monitoring Insights

The webhooks feature in Monitoring Insights lets you integrate errors with third-party apps such as Slack, Jira, ServiceNow, PagerDuty, and your DevOps pipeline for receiving notifications. This is particularly useful for sending messages to your preferred apps notifying subscribed users when an error is opened or closed. Webhooks typically use HTTP requests with a JSON payload, which includes the message and other optional details as described below.

Note: Webhooks are separate from the alerting profiles you have set up. A webhook will always be sent when an error is opened or closed (depending on how you have configured it) for any monitor in your account, regardless of the alerting state or how your alert profiles are configured.

Configuring Webhooks

The Integrations panel in Monitoring Portal is where you configure and manage webhooks, and define relevant targets required to receive notifications in the event of an error being opened or closed.

Step by Step: Create a Webhook

  1. Go to Settings > Integrations. The Integrations panel appears, displaying any current webhooks.
  2. Click the Create New Webhook button. The Create Webhook Configuration page opens.
  3. Webhook Configuration screen (Click image to view larger)

    The Create New Webhook Configuration screen.

  4. Enter the following information based on the application you want the webhook to integrate with:
    • Status: Set the status to Enabled or Disabled to indicate whether or not this webhook should send notifications to your app. For webhooks with disabled status, no events will be triggered for your app.
    • Run Webhook when Error: Select either Opened or Closed to indicate whether the error is opened or closed.
    • Name: The name of the webhook, typically, prefixed with opened or closed based on the previous selection.
    • Request Method: Select from the available request methods: POST, PUT, GET. By default, POST is selected for a new webhook request.
    • URL: Enter the URL for the application you want to receive notifications from. For example, following is a sample incoming webhook URL from Slack:
    • Request Headers: (Optional) Enter any applicable request headers for the webhook, e.g., authorization type Bearer Token with Content-Type application/json. If you have multiple request headers, specify them each on separate lines.
    • Body Payload: Enter the body parameters as needed by your application. You can also use the macros as shown in the help text displayed on the right side of the Create Webhook Configuration screen. These macros represent dynamic values that are sent in the payload, relevant to the specific monitor error. For example, to configure your webhook to send notifications to Slack as an incoming webhook, you could use the following sample body:

      {"text":"{{error-summary}} ({{error-ref}})\n>>>Script: {{error-source}}\nError: {{error-description}} ({{error-result-code}})\nSeverity: {{error-severity}}\nState: {{error-state}}\nEnvironment: amruthmon\nFurther details can be found <{{error-url}}|here>"}

    • Note that this field is optional for GET requests.

    • Email Address for Failures: Specify a list of e-mail addresses that you want to send notifications to when a webhook fails to send the message, i.e., if the endpoint of your application is unavailable, or if it returns an HTTP error. To add multiple email addresses, separate them with a semicolon.
    • Cancel: Click to discard the webhook configuration.
    • Test: Click to confirm that the webhook that you've just created is valid. The Test Webhook page opens, displaying the response from the endpoint.
    • testing webhook

    • Save: Click to save the newly configured webhook. The new webhook appears in the list of current webhooks.

Editing and Deleting Webhooks

  • To edit a webhook, click the Edit pencil icon next to it. The Edit Webhook Configuration page opens.
  • Make the changes as required and click Update.
  • To delete a webhook, click the Trash icon on the Action column in the Current Webhooks table. Then, click Yes to confirm.


This topic was last updated on October 23, 2020, at 09:02:05 AM.

Eggplant icon | Documentation Home | User Forums | Support | Copyright © 2021 Eggplant