Setup a Microsoft Teams connection for Streaming Data Platform alerts using Webhooks.
0. To create a webhook in your MS Teams workspace you can use this guide
At the end of the process you get a url of the format:https://YOUR_URL.webhook.office.com/webhook2/<secret-token-by-ms>/IncomingWebhook/<secret-token-by-ms>
/webhook2/<secret-token-by-ms>/IncomingWebhook/<secret-token-by-ms>
You’ll need the second part
for the Request Path later in this guide.
1. Visit Admin → Connections and click New connection
2. Select Webhook
3. Provide a name and configuration
You can also optionally add tags (i.e. teams). Then add the Webhook configuration information with host outlook.office.com as included in the Microsoft Teams webhook URL. Moreover make sure that the Use HTTPS switch is turned on.
outlook.office.com
Use HTTPS
Next add one or multiple target Webhook channels.
1. Visit Admin → Channels and click Webhook
2. Setup the configuration options
For example the above will create the MS Teams Webhook, that is using the Webhook connection of microsoft-teams to POST in the general channel.
MS Teams Webhook
microsoft-teams
POST
general
In the field Request path you need to fill in the part of the Webhook URL like this /webhook2/<secret-token-by-ms>/IncomingWebhook/<secret-token-by-ms>.
In the field Body payload you need to use a custom payload based on the requirements of Microsoft Teams for messages. The following snippet shows an example payload for a simple message:
{"text": "{{CATEGORY}} {{LEVEL}} {{ID}}"}
Below is the configuration for Microsoft Teams alert channel:
To test the configuration follow this guide for Consumer Alerts and set lag >= 0 this will immediately trigger an alert.
If for example you create a rule to send infrastructure notifications to Microsoft Teams via Webhook, then the moment a Broker becomes offline, an HTTP POST will be made to the Microsoft Teams Webhook endpoint.
HTTP POST
On this page