Kurt Wolf

Microsoft Teams

Recommended Posts

We recently moved from Slack to Microsoft Teams.  I would like to get our alert integration working.  Does anyone have a writeup of doing this?

Share this post


Link to post
Share on other sites

I just sent out an email with some attached instructions for both of you - we're working on some more formal documentation, but I wanted to get it out there so you could use it!

Let me know how it goes - if others are interested, reply here and I can send over the same doc - and eventually I'll post a link to the official docs when they're ready.

Best,

Kerry

Share this post


Link to post
Share on other sites

I would be interested to see what this documentation looks like.  We have the email to Teams integration configured.  If there is a different way to do this, it would be very interested. 

Share this post


Link to post
Share on other sites

Hi All!

I've tested this and it works. No reply options yet, but it's a start

Create a channel for webhooks in Teams copy that adress and use it in your Integration ( I copied a Slack integration)

And I've used the following JSON formatting

{
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "themeColor": "ff0000",
    "title": "Company - LM Webhook Test",
    "text":"Alerts!",
    "sections": [{
        "activityTitle": "Action Required!",
        "activitySubtitle": "Here are the details",
        "Facts": [{
            "name": "Host:",
            "value": "##HOST##"
        }, {
            "name": "Datasource",
            "value": "##DATASOURCE##"
        }, {
            "name": "Displayname:",
            "value": "##system.displayname##"
        }, {
            "name": "InstanceGroup:",
            "value": "##INSTANCEGROUP##"
        }, {
            "name": "Datapoint:",
            "value": "##DATAPOINT##"
        }, {
            "name": "Datapoint Description:",
            "value": "##DPDESCRIPTION##"
        }, {
            "name": "Level:",
            "value": "##LEVEL##"
        }, {
            "name": "Start:",
            "value": "##START##"
        }, {
            "name": "Duration:",
            "value": "##DURATION##"
        }, {
            "name": "Value:",
            "value": "##VALUE##"
        }, {
            "name": "Threshold:",
            "value": "##THRESHOLD##"
        }, {
            "name": "ClearValue:",
            "value": "##CLEARVALUE##"
        }, {
            "name": "Reason:",
            "value": "##DATAPOINT## ##THRESHOLD##"
        }, {
            "name": "Group:",
            "value": "##GROUP##"
        }],
        "markdown": true
    }]
}

Share this post


Link to post
Share on other sites

Hey Guys,

Give me a couple hours to see if I can't make our instructions publicly accessible today - I can see now there's plenty of demand and we've had another go at cleaning them up so I will see what I can't get posted.

Have a couple meetings this morning but can follow up a bit later. Appreciate the patience ... !

Best,

Kerry

Share this post


Link to post
Share on other sites

Issue

Microsoft Teams is Microsoft's offering in the collaboration tools/ group chat space. Much like Slack or other similar tools, they provide an API interface for posting alerts to a Microsoft Teams channel.

Resolution

Screenshots of some of these steps are available down below after the code blocks.

  • - Add a new Custom Webhook Integration into LogicMonitor.
  • - "Use different URLs or data formats to notify on various alert activity."
  • - Insert the relevant payloads from the code sections below into each of the custom webhook stages.
  • - Once you've setup the Integration, you'll need to get the webhook URLs from Microsoft Teams as follows:
  • That should be it! Setup an escalation chain with your Integration, and set up Alert Rules for your escalation chain.

Active Alerts:

{
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "summary": "LogicMonitor Alert",
    "themeColor": "ff0000",
    "sections": [
        {
            "startGroup": true,
            "title": "LogicMonitor Automated Alert Notification",
            "activityImage": "http://www.logicmonitor.com/wp-content/uploads/2015/07/LM_Logo_Circle_Indigo_300px.png",
            "activityTitle": "Group: **##GROUP##**",
            "activitySubtitle": "##LEVEL## Alert received: ##ALERTID##",
            "text": "LogicMonitor Alert Details",
            "facts": [
                {
                    "name": "Group",
                    "value": "##GROUP##"
                },
                {
                    "name": "Host",
                    "value": "##HOST##"
                },
                {
                    "name": "Datasource",
                    "value": "##DATASOURCE##"
                },
                {
                    "name": "Datapoint",
                    "value": "##DATAPOINT##"
                },
                {
                    "name": "Threshold",
                    "value": "##THRESHOLD##"
                },
                {
                    "name": "Value",
                    "value": "##VALUE##"
                },
                {
                    "name": "Duration",
                    "value": "##DURATION##"
                },
                {
                    "name": "Start",
                    "value": "##START##"
                },
                {
                    "name": "Alert URL",
                    "value": "##AlertDetailURL##"
                },
                {
                    "name": "Service URL",
                    "value": "##URL##"
                },
                {
                    "name": "Website Description",
                    "value": "##WEBSITEDESCRIPTION##"
                },
                {
                    "name": "Website Checkpoint",
                    "value": "##CHECKPOINT##"
                },               
                {
                    "name": "Website Group",
                    "value": "##WEBSITEGROUP##"
                }
            ],
            "potentialAction": [
                {
                    "@type": "OpenUri",
                    "name": "Open Alert",
                    "targets": [
                        { "os": "default", "uri": "##AlertDetailURL##" }
                    ]
                }
            ]
        }
    ]
}

Escalated Alerts:

{
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "summary": "LogicMonitor Alert",
    "themeColor": "ffcc00",
    "sections": [
        {
            "startGroup": true,
            "title": "LogicMonitor Alert Update Notification",
            "activityImage": "http://www.logicmonitor.com/wp-content/uploads/2015/07/LM_Logo_Circle_Indigo_300px.png",
            "activityTitle": "Group: **##GROUP##**",
            "activitySubtitle": "##LEVEL## Alert received: ##ALERTID##",
            "text": "LogicMonitor Alert Details",
            "facts": [
                {
                    "name": "Group",
                    "value": "##GROUP##"
                },
                {
                    "name": "Host",
                    "value": "##HOST##"
                },
                {
                    "name": "Datasource",
                    "value": "##DATASOURCE##"
                },
                {
                    "name": "Datapoint",
                    "value": "##DATAPOINT##"
                },
                {
                    "name": "Threshold",
                    "value": "##THRESHOLD##"
                },
                {
                    "name": "Value",
                    "value": "##VALUE##"
                },
                {
                    "name": "Duration",
                    "value": "##DURATION##"
                },
                {
                    "name": "Start",
                    "value": "##START##"
                },
                {
                    "name": "Alert URL",
                    "value": "##AlertDetailURL##"
                },
                {
                    "name": "Service URL",
                    "value": "##URL##"
                },
                {
                    "name": "Website Description",
                    "value": "##WEBSITEDESCRIPTION##"
                },
                {
                    "name": "Website Checkpoint",
                    "value": "##CHECKPOINT##"
                },               
                {
                    "name": "Website Group",
                    "value": "##WEBSITEGROUP##"
                }
            ],
            "potentialAction": [
                {
                    "@type": "OpenUri",
                    "name": "Open Alert",
                    "targets": [
                        { "os": "default", "uri": "##AlertDetailURL##" }
                    ]
                }
            ]
        }
    ]
}

Acknowledged Alerts:

{
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "summary": "LogicMonitor Alert",
    "themeColor": "003366",
    "sections": [
        {
            "startGroup": true,
            "title": "LogicMonitor Acknowledgement Notification",
            "activityImage": "http://www.logicmonitor.com/wp-content/uploads/2015/07/LM_Logo_Circle_Indigo_300px.png",
            "activityTitle": "Group: **##GROUP##**",
            "activitySubtitle": "##LEVEL## Alert received: ##ALERTID##",
            "text": "LogicMonitor Alert Details",
            "facts": [
                {
                    "name": "Group",
                    "value": "##GROUP##"
                },
                {
                    "name": "Host",
                    "value": "##HOST##"
                },
                {
                    "name": "Datasource",
                    "value": "##DATASOURCE##"
                },
                {
                    "name": "Datapoint",
                    "value": "##DATAPOINT##"
                },
                {
                    "name": "Threshold",
                    "value": "##THRESHOLD##"
                },
                {
                    "name": "Value",
                    "value": "##VALUE##"
                },
                {
                    "name": "Duration",
                    "value": "##DURATION##"
                },
                {
                    "name": "Start",
                    "value": "##START##"
                },
                {
                    "name": "Alert URL",
                    "value": "##AlertDetailURL##"
                },
                {
                    "name": "Service URL",
                    "value": "##URL##"
                },
                {
                    "name": "Website Description",
                    "value": "##WEBSITEDESCRIPTION##"
                },
                {
                    "name": "Website Checkpoint",
                    "value": "##CHECKPOINT##"
                },               
                {
                    "name": "Website Group",
                    "value": "##WEBSITEGROUP##"
                }
            ],
            "potentialAction": [
                {
                    "@type": "OpenUri",
                    "name": "Open Alert",
                    "targets": [
                        { "os": "default", "uri": "##AlertDetailURL##" }
                    ]
                }
            ]
        }
    ]
}

Cleared Alerts:

{
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "summary": "LogicMonitor Alert",
    "themeColor": "33f449",
    "sections": [
        {
            "startGroup": true,
            "title": "LogicMonitor Alert Clear Notification",
            "activityImage": "http://www.logicmonitor.com/wp-content/uploads/2015/07/LM_Logo_Circle_Indigo_300px.png",
            "activityTitle": "Group: **##GROUP##**",
            "activitySubtitle": "##LEVEL## Alert received: ##ALERTID##",
            "text": "LogicMonitor Alert Details",
            "facts": [
                {
                    "name": "Group",
                    "value": "##GROUP##"
                },
                {
                    "name": "Host",
                    "value": "##HOST##"
                },
                {
                    "name": "Datasource",
                    "value": "##DATASOURCE##"
                },
                {
                    "name": "Datapoint",
                    "value": "##DATAPOINT##"
                },
                {
                    "name": "Threshold",
                    "value": "##THRESHOLD##"
                },
                {
                    "name": "Value",
                    "value": "##VALUE##"
                },
                {
                    "name": "Duration",
                    "value": "##DURATION##"
                },
                {
                    "name": "Start",
                    "value": "##START##"
                },
                {
                    "name": "Alert URL",
                    "value": "##AlertDetailURL##"
                },
                {
                    "name": "Service URL",
                    "value": "##URL##"
                },
                {
                    "name": "Website Description",
                    "value": "##WEBSITEDESCRIPTION##"
                },
                {
                    "name": "Website Checkpoint",
                    "value": "##CHECKPOINT##"
                },               
                {
                    "name": "Website Group",
                    "value": "##WEBSITEGROUP##"
                }
            ],
            "potentialAction": [
                {
                    "@type": "OpenUri",
                    "name": "Open Alert",
                    "targets": [
                        { "os": "default", "uri": "##AlertDetailURL##" }
                    ]
                }
            ]
        }
    ]
}

 

Custom Webhook Overview

image2018-10-25_16-40-52.png?version=1&modificationDate=1540510852000&api=v2

 

Teams Channel Connectors

image2018-10-25_16-42-10.png?version=1&modificationDate=1540510931000&api=v2

 

Incoming Webhook Connector

image2018-10-25_16-42-44.png?version=1&modificationDate=1540510964000&api=v2

Edited by Kerry DeVilbiss
formatting clarity

Share this post


Link to post
Share on other sites

Hi,

Interested to try this integration piece with our Microsoft Teams. I cannot see the pictures as well. Is there a possibility you can provide the information.

 

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now