cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post

Microsoft Teams Integration with Orion Alerts

With the new release of Microsoft Teams, I got a tad curious and went to see what integrations were available.

Much like Slack, PagerDuty, and  a host of others; Teams gleefully accepts incoming webhooks as a native integration. Below is a summary of how to achieve this in your Teams environment.

Step 1:

As an administrator of your organization's Team software, login to your Teams desktop application and click on the Team that you wish to add your integration to, then select "Connectors"

step 1.jpg

Step 2:

Search for "Incoming Webhook" and click "Add"

step 2.jpg

Step 3:

Name your new Webhook, add an optional Icon, and click "Create"

step 3.jpg

Step 4:

Copy your URL to be used with your alert action in a moment

step 4.jpg

Step 5:

At this point, 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 as well

step 5.jpg

step 5a.jpg

Step 6:

Configure an alert action (Send a GET or POST Request To A Web Server) and include your Webhook URL and associated payload (example below)

step 6.jpg

Step 7:

Enjoy your new feed of alerts!

step 7.jpg

Here's the payload snippet I am using in my action at present:

{
  "title": "ALERT TRIGGER: ${N=SwisEntity;M=Caption} is currently ${N=SwisEntity;M=Status}",
  "text": "DEVICE: [${N=SwisEntity;M=Caption}](${N=SwisEntity;M=DetailsUrl})
  IP ADDRESS: ${N=SwisEntity;M=IP_Address}
  VENDOR: ${N=SwisEntity;M=Vendor}
  MODEL: ${N=SwisEntity;M=MachineType}
  [ALERT DETAILS](${N=Alerting;M=AlertDetailsUrl})
  [ACKNOWLEDGE THIS ALERT](${N=Alerting;M=AcknowledgeLink})"
}

Please note that there is some good information to be found in the API Reference as well: Office 365 Connectors API Reference - Outlook Dev Center

Enjoy!

Labels (2)
Comments

Thanks for this zackm​! just setup on new instance of Teams and it worked flawlessly.

Thanks for the post. It was very helpful.

Thanks for sharing this! Greatly appreciated!

Has anyone been able to get this to work via PowerShell? With chad.every​'s help I was able to get mine working with slack via PowerShell.... but would like to see what needs to change for MS Teams.

Slack - Alert Integration - Node

Also this topic was discussed discussed in this SolarWinds lab episode:

AWESOME ALERT INTEGRATION: SLACK, SERVICE DESK AND MORE

This is just beautiful...

MSTeams_Alert.png

pastedImage_0.png

This is my card for same setup.

Code:

{     "@type": "MessageCard",     "@context": "http://schema.org/extensions",     "themeColor": "7471D8",     "summary": "Node down",     "sections": [{         "activityTitle": "Node down: ${N=SwisEntity;M=Caption}",         "activitySubtitle": "Alert triggered ${N=Alerting;M=AlertTriggerTime;F=DateTime}",         "activityImage": "http://link.to.image.jpg",         "facts": [{             "name": "Device",             "value": "[${N=SwisEntity;M=Caption}](${N=SwisEntity;M=DetailsUrl})"         }, {             "name": "IP",             "value": "${N=SwisEntity;M=IP_Address} "         }, {             "name": "Vendor",             "value": "${N=SwisEntity;M=Vendor}"         }, {             "name": "Model",             "value": "${N=SwisEntity;M=MachineType}"         }, {             "name": "Details",             "value": "[${N=Alerting;M=AlertDetailsUrl}](${N=Alerting;M=AlertDetailsUrl}) "         }, {             "name": "Acknowledge",             "value": "[${N=Alerting;M=AcknowledgeLink}](${N=Alerting;M=AcknowledgeLink})"         }],         "text": "${N=SwisEntity;M=Caption} is currently ${N=SwisEntity;M=Status}",         "markdown": true     }] }

I find it easier to read when formatted this way.

Any luck with this? I've been looking into doing the same thing

Yea this worked a while back. Not sure if it still does though! I would imagine nothing has changed.

Thanks zackm​ !! Found this really helpful.

Worked for me

Of course we customized it a bit, but this is fantastic. Looks a bit cleaner.
Thanks for foundation.

Worked for me too, thanks zackm

Nice. Thanks

Hello - I'm using this snippet (which should be the same as step #6 above, but with Severity added), but when the alert triggers what shows up in Teams is basically useless.   Can anyone suggest an idea as to what it wrong with my setup?  Thank you!

  "title": "ALERT TRIGGER: ${N=SwisEntity;M=Caption} is currently ${N=SwisEntity;M=Status}", 

  "text": "DEVICE: [${N=SwisEntity;M=Caption}](${N=SwisEntity;M=DetailsUrl}) 

  IP ADDRESS: ${N=SwisEntity;M=IP_Address} 

  VENDOR: ${N=SwisEntity;M=Vendor} 

  MODEL: ${N=SwisEntity;M=MachineType}   

  SEVERITY: ${N=Alerting;M=Severity} 

  [ALERT DETAILS](${N=Alerting;M=AlertDetailsUrl}) 

  [ACKNOWLEDGE THIS ALERT](${N=Alerting;M=AcknowledgeLink})" 

}

pastedImage_1.png

I am hoping someone on this thread might be able to assist on some questions I have on this.  

 

1. Do you just add this to an existing alert or do you create new ones for just the teams alerting?

2. I followed the instructions above and I get an HTTP error.  I am hoping someone might have some tips I can use to troubleshoot my setup. 

3. Any other fun suggestions for this.  

 

Thanks - Dave

@martian_monster and @tdowns Below is the JSON which worked for me and below also reference link for you. 

https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-u... 

{
"themeColor": "0076D7",
"summary": "Solarwinds Node Alert",
"sections": [{
"facts": [{
"name": "Node",
"value": "${N=SwisEntity;M=Caption}"
},
{
"name": "Status",
"value": "${N=SwisEntity;M=Status;F=Status}"
},
{
"name": "Function",
"value": "${N=SwisEntity;M=CustomProperties.App_Name}"
},
{
"name": "IPaddress",
"value": "${N=SwisEntity;M=IP_Address}"
}
],
}
],

}

 

@sharan24  Thanks for the input.  Unfortunately, it didn't fix my problem.

@tdowns Were you ever able to make this work...Im trying to set up the same integration and running into similar useless info in teams.

@travis.schlafke   No I have not.   I messed with it a week or two ago and couldn't get it to work.   More pressing issues took over my time.

@tdowns I got it working...the key was selecting the right alerts...I have it set up only to trigger for down/warning/critical nodes and then everything comes across properly formatted.  I assume you need to reference different items if you want to do messages for things like memory/cpu/disk.  Try that and see if it comes across right for you.

Version history
Revision #:
1 of 1
Last update:
‎11-04-2016 04:30 PM
Updated by: