Webhook Integrations with Third-Party Apps

This page provides sample configuration for Monitoring Insight Webhook with third party applications.

Slack

To integrate Incoming Webhooks in Slack, follow these steps:

  1. Go to the Configure apps section from your Slack instance by clicking https://<your workspaces.slack.com/account/settings.
  2. Search for Incoming Webhooks in the Apps directory of Slack. If no Incoming Webhooks are found, then create one for the Slack app by following the Slack Incoming Webhooks documentation. You may need to contact your IT administrator to approve the Webhook app based on your Slack workspace configuration (see the Slack docs for more information).
  3. After creating the app, go back to your Slack Account > Configure apps section and search for the newly created Incoming Webhooks app.
  4. Select the app and enable the incoming-webhook for posting messages to a channel or individual. This will generate an Incoming Webhook URL. To get approval for this process, you may need to contact your IT administrator. Here is an example URL for an Incoming Webhook in Slack:
  5. https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

  6. Create a new Webhook Profile with the Error and Recovery Payloads.
  7. Error Payload

    {

    "text": "{{error-summary}} ({{error-ref}})\n>>>Script: {{error-source}}\nError: {{error-description}} ({{error-result-code}})\nSeverity: {{error-severity}}\nState: {{error-state}}\nEnvironment: Eggplat Monitoring Insights\n To check the status of this error and view further information, <{{error-url}}|click on this link>!",

    }

    Recovery Payload

    {

    "text": "{{error-summary}} ({{error-ref}})\n>>>Script: {{error-source}}\nError: {{error-description}} ({{error-result-code}})\nSeverity: {{error-severity}}\nState: {{error-state}}\nEnvironment: Eggplat Monitoring Insights\n To check the status of this error and view further information, <{{error-url}}|click on this link>!",

    }

    For example, this is how incoming Webhook notifications in Slack appear:

PagerDuty

To integrate Webhooks notifications in PagerDuty, follow these steps:

  1. Set up the Pagerduty integration for your service by following these instructions.
  2. Copy the PagerDuty integration Key for the service you are monitoring, which will be used as routing_key in the Error and Recovery payload.
  3. If you're using Event API V2, create the Webhook profile using the URL: https://events.pagerduty.com/v2/enqueue. For more information about Event API V2, see the PagerDuty Developer Guide.
  4. Use the same PagerDuty Integration Key as the routing_key in the Error and Recovery payload when creating the Webhook Profile.
  5. Error Payload

    {

    "payload": {

    "summary": "{{error-severity}} | {{error-source}}",

    "source": "{{error-source}}",

    "severity": "error",

    "class": "{{error-description}}",

    "custom_details": {

    "alertsummary": "{{error-summary}}",

    "alertsource": "{{error-source}}",

    "alertseverity": "{{error-severity}}",

    "alertresultCode": "{{error-result-code}}",

    "alertdescription": "{{error-description}}",

    "alerterrorreference": "{{error-ref}}",

    "alerterrorurl": "{{error-url}}",

    "alertstate": "{{error-state}}",

    "environment": "Eggplant Monitoring Insights"

    }

    },

    "routing_key": "03bfc5b40e0b4b83a6f535984aa76fa4",

    "event_action": "trigger",

    "dedup_key": "{{error-ref}}",

    "client": "Eggplant Monitoring Insights",

    "client_url": "{{error-url}}",

    "images": [{

    "src": "https://portal.hub.eggplant.cloud/common/image/ncc/eggplant-logo.png",

    "href": "https://portal.hub.eggplant.cloud/hub/login.php",

    "alt": "Eggplant"

    }],

    "links": [{

    "href": "{{error-url}}",

    "text": "To check the status of this error and view further information, click on this link"

    }]

    }

    Recovery Payload

    {

    "payload": {

    "summary": "{{error-severity}} | {{error-source}}",

    "source": "{{error-source}}",

    "severity": "error",

    "class": "{{error-description}}",

    "custom_details": {

    "alertsummary": "{{error-summary}}",

    "alertsource": "{{error-source}}",

    "alertseverity": "{{error-severity}}",

    "alertresultCode": "{{error-result-code}}",

    "alertdescription": "{{error-description}}",

    "alerterrorreference": "{{error-error-ref}}",

    "alerterrorurl": "{{error-url}}",

    "alertstate": "{{error-state}}",

    "environment": "Eggplat Monitoring Insights"

    }

    },

    "routing_key": "03bfc5b40e0b4b83a6f535984aa76fa4",

    "event_action": "resolve",

    "dedup_key": "{{error-ref}}",

    "client": "Eggplant Monitoring Insights",

    "client_url": "{{error-url}}",

    "images": [{

    "src": "https://portal.hub.eggplant.cloud/common/image/ncc/eggplant-logo.png",

    "href": "https://portal.hub.eggplant.cloud/hub/login.php",

    "alt": "Eggplant"

    }],

    "links": [{

    "href": "{{error-url}}",

    "text": "To check the status of this error and view further information, click on this link"

    }]

    }

    When a failure is detected in Eggplant Monitoring Insights, the Error Webhook will trigger a new incident in PagerDuty. After the error is recovered, this webhook will then send a recovery notification which will automatically resolve the incident in PagerDuty.

    incident notification  Click image to view larger

    incident resolved  Click image to view larger

MS Teams

To integrate Webhooks notifications within MS teams, follow these steps:

  1. Create a webhook connector by following the MS teams Webhooks and connectors guide.
  2. Copy the URL and create the Webhook profile using the URL with the sample Error and Recovery payload. Add an integration for the service with the Error and Recovery Payloads as described below.
  3. Error Payload

    {

    "@type": "MessageCard",

    "@context": "https://schema.org/extensions",

    "themeColor": "994444",

    "summary":"EggPlant Alert: {{error-state}} for {{error-source}}",

    "sections": [

    {

    "facts": [

    {

    "name": "Summary:",

    "value": "{{error-summary}}"

    },

    {

    "name": "State:",

    "value": "{{error-state}}"

    },

    {

    "name": "Source:",

    "value": "{{error-source}}"

    },

    {

    "name": "ResultCode:",

    "value": "{{error-result-code}}"

    },

    {

    "name": "Description:",

    "value": "{{error-description}}"

    },

    {

    "name": "Error Severity:",

    "value": "{{error-severity}}"

    },

    {

    "name": "ErrorRef:",

    "value": "{{error-ref}}"

    },

    {

    "name": "Link to EggPlant Error Report:",

    "value": "To check the status of this error and view further information, [click on this link]({{error-url}})"

    }

    ]

    }

    ]

    }

    Recovery Payload

    {

    "@type": "MessageCard",

    "@context": "https://schema.org/extensions",

    "themeColor": "994444",

    "summary":"EggPlant Alert: {{error-state}} for {{error-source}}",

    "sections": [

    {

    "facts": [

    {

    "name": "Summary:",

    "value": "{{error-summary}}"

    },

    {

    "name": "State:",

    "value": "{{error-state}}"

    },

    {

    "name": "Source:",

    "value": "{{error-source}}"

    },

    {

    "name": "ResultCode:",

    "value": "{{error-result-code}}"

    },

    {

    "name": "Description:",

    "value": "{{error-description}}"

    },

    {

    "name": "Error Severity:",

    "value": "{{error-severity}}"

    },

    {

    "name": "ErrorRef:",

    "value": "{{error-ref}}"

    },

    {

    "name": "Link to EggPlant Error Report:",

    "value": "To check the status of this error and view further information, [click on this link]({{error-url}})"

    }

    ]

    }

    ]

    }

    Sample MS Teams Incoming Webhook Notifications

    sample incoming webhook notification

Jira Integration

  1. Create a Jira API basic token using the Jira Integrations Guide.
  2. Create a Webhook with your Jira API URL.
  3. Use the token as the Request Header in the Webhook configuration.
  4. Authorization: Basic <<mysecuretoken>>

    Content-Type: application/json

  5. Use the sample Error for sending Webhook notifications to Jira API.
  6. {

    "fields": {

    "issuetype": {

    "id": "15"

    },

    "project": {

    "key": "MyTestProject"

    },

    "description": "Error ref.: {{error-ref}}\n\nUrl: {{error-url}}nnDescription: {{error-description}}",

    "summary": "{{error-source}}: {{error-severity}} - Result Code {{error-result-code}}"

    }

    }

 

 

This topic was last updated on August 19, 2021, at 03:30:47 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2021 Eggplant