Integrating SolarWinds Orion Platform and Hybrid Cloud Observability Alerts Into Your Microsoft Teams Channel
Many organizations are either Microsoft Teams or Slack shops (or both) and have various channels set up to communicate and collaborate on specific issues or topics. To reduce the context switching from web console or email to Microsoft Teams, why not have alerts streamed directly into the relevant Teams Channels?
Below, we will walk you through a simple step-by-step example of how to accomplish this.
Microsoft Teams Configuration
- As an administrator of your Microsoft Teams implementation, log into your Teams desktop application and click on the Team that you wish to add your integration to, then select "Connectors"
- Search for "Incoming Webhook" and click "Add" (or "Configure" if other hooks have been setup for this Team)
- Name your new Webhook, add an optional Icon, and click "Create"
- Copy your URL and keep it in a safe place - you'll need this when you configure the alert.
- You should see that you have a newly configured Webhook in your Connectors list, and you should also have a new message in your Team reflecting this addition
SolarWinds Platform Alert Configuration
Configure an alert action (Send a GET or POST Request To A Web Server) and include your Webhook URL and associated payload (this example will be provided below)
You can leave all other settings "as is." Save your changes and be sure to give the action a good name. You'll probably be referencing them frequently.
According to a recent comment, the
ContentType
displayed above no longer works. It should instead beapplication/json
.
These are very simple examples, but you can see the power and flexibility of moving towards this method of alerting.
Results
When an alert triggers (or resets), your output will look something like our example.
JSON Payloads
Here's the payload snippets that were defined in the trigger and reset actions for this reference example.
{ "title": "ALERT TRIGGER: ${N=SwisEntity;M=Caption} is currently ${N=SwisEntity;M=Status}", "text": "DEVICE: [${N=SwisEntity;M=Caption}](${N=SwisEntity;M=DetailsUrl})\n\rIP ADDRESS: ${N=SwisEntity;M=IP_Address}\n\rVENDOR: ${N=SwisEntity;M=Vendor}\n\rMODEL: ${N=SwisEntity;M=MachineType}\n\r[ALERT DETAILS](${N=Alerting;M=AlertDetailsUrl})\r\n[ACKNOWLEDGE THIS ALERT](${N=Alerting;M=AcknowledgeLink})" }
{ "title": "ALERT RESET: ${N=SwisEntity;M=Caption} is currently ${N=SwisEntity;M=Status}", "text": "DEVICE: [${N=SwisEntity;M=Caption}](${N=SwisEntity;M=DetailsUrl})\n\rIP ADDRESS: ${N=SwisEntity;M=IP_Address}\n\rVENDOR: ${N=SwisEntity;M=Vendor}\n\rMODEL: ${N=SwisEntity;M=MachineType}\n\r[ALERT DETAILS](${N=Alerting;M=AlertDetailsUrl})\r\n[ACKNOWLEDGE THIS ALERT](${N=Alerting;M=AcknowledgeLink})" }
Note that the \r\n
in the above code converts to a new line character when displayed.
You can also reference and leverage the documentation and example here - Get started with actionable messages via connectors - Outlook Developer | Microsoft Learn
Next Steps
As stated, this is a very simple example of how you can use Teams as an alerting method, but the flexibility of the card system allows for even more extensions. If you're interested, you can learn more at Legacy actionable message card reference - Outlook Developer | Microsoft Learn and tweak your cards at the MessageCard Playground V2 which lets you preview your cards before putting them into production.
Now that you have the basics of the Webhook and card systems in your corner, how do you plan on extending your alert integrations? We're always pumped to see how people have used new tips and tricks as they are explored. If you've got some good examples, we'd love to see them.
Top Comments