Send incident notifications to Webex
APEX AIOps Incident Management can forward incident notifications to Webex. Follow these steps to configure an incident webhook endpoint to send incidents to a specific team space.
Before you begin
Before you set up your Webex outbound integration:
Make sure you are signed into your Incident Management instance.
Make sure you are signed into Webex.
Set up an incoming webhook in Webex
Log in to Webex App Hub at
apphub.webex.com
.Search for "Incoming Webhooks."
Click the Incoming Webhooks tile, then click Connect.
Follow the prompt to log in again.
Click Accept.
Scroll down. In the Webhook Name field, provide a name for your webhook, such as "Incident Management."
In the Select a space field, select a team space from the list.
Click Add.
Copy the generated Webhook URL and save it somewhere for later use.
Configure the CREATE webhook endpoint in Incident Management
Once you have finished configuring the properties in Webex, you must create new incident webhook endpoints in Incident Management in order to send data to Webex. This section explains how to set up the Webex CREATE webhook endpoint, which sends notifications to Webex when incidents are created in Incident Management.
To configure the CREATE webhook endpoint:
Log into Incident Management and navigate to Integrations > Outbound Integrations > Webhook Endpoint > Incident Webhook Endpoint.
Click Add Incident Webhook Endpoint and enter "Webex CREATE" as the name of the webhook endpoint. Optionally, provide a description.
Complete each section of the webhook endpoint according to the following:
Skip the Triggers section.
Configure the Endpoint:
Set the Request Method to POST.
Under URL, paste the Webhook URL that you copied from Webex.
For Authorization, make sure No auth is selected.
Specify the Payload Body:
Replace the default payload in the Key/Value Editor with the following:
{ "markdown": "Incident #$id with severity $severity, status $status, and description $description", "timestamp": "$created_at" }
Scroll up to the top of the page and click Test in the upper right-hand corner. You should see response details and a confirmation that the webhook endpoint is configured correctly.
Make additional payload adjustments according to your business needs. To learn more about fine-tuning your outbound payload, read Configure the CREATE payload body for a webhook endpoint.
Save the webhook endpoint.
Configure the UPDATE webhook endpoint in Incident Management
Next, create a Webex UPDATE webhook endpoint, which sends notifications to Webex when Incident Management incidents are updated.
To configure the UPDATE webhook endpoint:
Navigate to Integrations > Outbound Integrations > Webhook Endpoint > Incident Webhook Endpoint.
At the far right side of the "Webex CREATE" webhook endpoint you just configured, click on the copy icon:
Enter "Webex UPDATE" for the name of the duplicate webhook endpoint and click Duplicate.
Click on the "Webex UPDATE" webhook endpoint to open it.
Click Edit.
Under the Triggers section, select the conditions that you would like to trigger the webhook endpoint.
Skip to the Payload Body section:
Replace the payload in the Key/Value Editor with the following:
{ "markdown": "Updated Incident #$id with severity $severity, status $status, and description $description", "timestamp": "$created_at" }
Scroll up to the top of the page and click Test in the upper right-hand corner. You should see response details and a confirmation that the webhook endpoint is configured correctly.
Make additional payload adjustments according to your business needs. To learn more about fine-tuning your outbound payload, read Configure the UPDATE payload body for a webhook endpoint.
Save the webhook endpoint.
Configure the CREATE workflow in Incident Management
Configure an incident workflow called Webex CREATE Workflow, which triggers the "Webex CREATE" webhook endpoint when an incident is created in Incident Management.
To configure the CREATE workflow:
Log into Incident Management and navigate to Correlate & Automate > Workflow Engine > Incident Workflows.
Click Add Workflow and enter "Webex CREATE Workflow" as the name of the workflow. Optionally, provide a description.
For the Trigger, select New incidents only.
If desired, add a filter condition on the incidents that you wish to forward to Webex.
Click Add Action, select the Send to Endpoint action and then click Add Selected Action.
Select the new Send to Endpoint action complete each section according to the following:
Webhook: Select the "Webex CREATE" incident webhook endpoint that you created earlier.
External Link: Skip this section.
Integration Name: Enter the following (without quotes): "Webex Integration"
Skip all remaining sections.
Save and Enable the workflow.
Configure the UPDATE workflow in Incident Management
Finally, configure another incident workflow called Webex UPDATE Workflow, which triggers the "Webex UPDATE" webhook endpoint to send data when an incident is updated in Incident Management.
To configure the UPDATE workflow:
Navigate to Correlate & Automate > Workflow Engine > Incident Workflows.
Click Add Workflow and enter "Webex UPDATE Workflow" as the name of the workflow. Optionally, provide a description.
For the Trigger, select Changed incidents only.
Click Add Action, select the Send to Endpoint action and then click Add Selected Action.
Select the new Send to Endpoint action and complete each section as follows:
Webhook: Select the "Webex UPDATE" incident webhook endpoint that you created earlier.
External Link: Skip this section.
Integration Name: Enter the following: "Webex Integration"
Skip all remaining sections.
Save and Enable the workflow.
Test the integration
Navigate to Integrations > Ingestion Services > Events API.
Add your API key to the provided cURL command and run the command in an external terminal to send an event to Incident Management.
Verify that an incident has been created in Incident Management.
Within Webex, verify that an incident notification has arrived. You should also see the test notification(s) you sent earlier.
If you have enabled updates and included Status changed as a trigger, close the incident in Incident Management and verify in Webex that an update notification has arrived.