Microsoft Teams


Recommended Posts

  • LogicMonitor Staff

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

Link to post
Share on other sites
  • 2 weeks later...
  • 2 weeks later...

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
    }]
}

Link to post
Share on other sites
  • LogicMonitor Staff

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

Link to post
Share on other sites
  • LogicMonitor Staff

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
Link to post
Share on other sites
  • 1 month later...
  • 2 weeks later...
  • 7 months later...
  • 1 month later...
  • 7 months later...
  • 2 months later...

Hello, I'm trying to follow the instructions but looks like they are outdated. Does anyone have this working in their tenant, and willing to share how it's set up? We are in the trial phase with LM right now and one of the big selling points was that it had integrations with Microsoft Teams. It's a bit disappointing to find out there isn't an official integration (seems to be a bit of a disconnect with the sales team) but as long as I can get this working my boss and team will be happy. I asked support about it but since there isn't an officially supported method they pointed me to the community.

Link to post
Share on other sites

Scratch that. I found and added the json file, and this is making a bit more sense. Only question I've got is, what permissions/licensing does the O365 account being used for the integration need?

Link to post
Share on other sites
  • 3 months later...

Hello,

 

Has anyone figured out how to add an action to the MS Teams card to ACK or SDT the Alert from the MS Teams Channel Card?  Slack has this capability, but I can't figure out what URI is needed to perform the action.  ITs great to see the "Open Alert" action, but would love to ACK and SDT right next to the OPEN Alert action button in Teams.  Thanks!

Link to post
Share on other sites

I talked with support when I was setting this up and the answer right now is that this is not an "official" integration like Slack. So it's very limited, which is why there's no ACK or SDT at the moment. They did say an official integration is in the works but couldn't provide any more info like an eta.

  • Like 2
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.