Cisco Webex for Alert Notifications
Last updated
Last updated
This article shows you how to receive ThousandEyes alert notifications in a Cisco Webex App space using webhooks.
Create a new Webex bot: A Webex bot lets you integrate services into Webex. In the Webex App, create a new bot to receive alert notifications from the ThousandEyes webhook. For detailed instructions, see Creating a Webex Bot. Use the screenshots below to help you create your bot.
Copy the bot's access token: After setting up your new Webex bot, copy the bot's access token and paste it somewhere handy. You'll need this token for the ThousandEyes integration.
In Webex App, create a space to receive alert notifications from ThousandEyes: Skip this step if you already have a Webex App space where you'd like to receive alerts.
Add the Webex App bot to the space: In this example, the bot named "ThousandEyes Custom Webhook Test" is added to the "ThousandEyes-Webhook-Test" Webex App space.
Copy the space's roomId: You'll use the roomId
with the bot's access token (from Step 2) to configure the ThousandEyes integration. Now that the Webex bot is a member of your Webex App space, look up the roomId
of your Webex App space and copy it. To find the roomId
:
Use your Webex App login to access the Webex API site.
Using a web browser, navigate to the following URL to look up the roomId
: https://developer.webex.com/docs/api/v1/rooms/list-rooms
Create a new alert integration: From the ThousandEyes app, create a new alert integration using custom webhooks. The webhook integration sends alert notifications to the Webex App bot. The Webex App bot publishes these notifications as messages in the Webex App space. To create a new alert integration:
Navigate to Integrations.
Click + New Integration.
Select Custom Webhook.
Configure your custom webhook to work with Webex App: ThousandEyes custom webhooks offer a preset configuration that populates the fields with the settings you need to integrate with Webex App. In the Preset Configurations field, select Cisco Webex.
Fill out the other fields as follows:
Name: Example: "Webex App Test"
URL: Use the url for Webex App Messages: "https://webexapis.com/v1/messages"
Auth Type: Token
Bearer Token: Use the Webex App bot's access token (see Step 2)
Headers: Content-Type application/json
Body: Add the roomId
(see Step 5) to the JSON content in the Body field, before the line that says "markdown"
. To do this, create a new line, then add the following text:"roomId" : "<yourWebex App space roomId>"
. Replace <yourWebex App space roomId>
with the roomId
from Step 5. The final result should look something like the entry below:
Test the integration: At the bottom of the Add Custom Webhook Integration screen, click Test.
A successful test returns the message Testing completed successfully! HTTP status: OK (200)
, as shown above.
Verify that the "Sample Test" message shows up in the Webex App space.
Click the Save button to save the integration.
If the test fails, click Save to save the integration; then re-open the integration and test it again. If the test still fails, verify that the webhook URL in the ThousandEyes custom webhook matches the incoming Webex App webhook.
Apply the new integration to your alert rules: Do this using the resulting Manage Alert Rules side panel.
For more information on configuring webhooks, see Custom Webhooks.