Forum Discussion

Jonathan_Hart's avatar
3 years ago

Move from Slack to MS Teams

Hello,

We are planning to move from Slack to Microsoft Teams and therefore need to look into how we change our Slack integration alerts into MS Teams alerts.

Is there any up to date information/instructions on this?


TIA.

6 Replies

  • Hi Jonathan,

    This can be done. I will try to find my notes and post them here.

    Meanwhile, on the LM side you have to create an Integration which posts message to http endpoint.

    On the MS Teams side you need to create a webhook in the teams-channel which is used by LM to post a message

    I'll let you know when I found my notes

  • 2 hours ago, Jeroen Gouma said:

    Hi Jonathan,

    This can be done. I will try to find my notes and post them here.

    Meanwhile, on the LM side you have to create an Integration which posts message to http endpoint.

    On the MS Teams side you need to create a webhook in the teams-channel which is used by LM to post a message

    I'll let you know when I found my notes

    Thank you! Much appreciated. I will look into it while you search for your notes.

  • Jonathan,

    Sorry for the delay. I was not in the office for some time. 

    Please see instructions below. 

    Open Teams and right click the 3 dots behind the channel where the notifications should appear

    • Select “Connectors” and create an “Incoming webhook”.
    • Give it a name and click <Create>
    • Copy the provided URL, you will need it in a later stage 

    Open LogicMonitor webinterface and go to “Settings > Integrations”

    • Click <Add> to create a new integration
    • Click on “Custom HTTP Delivery”
    • Give it a name and description, select “HTTP Post” as method
    • In the URL-Field, paste the URL you saved earlier from Teams
    • Leave username and password empty
    • Select “Raw” as data type, and “JSON” as format
    • Paste text below in the body field:
    {
        "@type": "MessageCard",
        "@context": "http://schema.org/extensions",
        "themeColor": "FF0000",
        "summary": "##ALERTID##",
        "sections": [{
            "activityTitle": "##LEVEL##: ##HOST## ##DATASOURCE##",
            "activitySubtitle": "",
            "activityImage": "https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcT6Jn1ZYbUYMiP1RWtWhcXjnAYiOSfvCwiB_w&usqp=CAU",
            "facts": [{
                "name": "Type",
                "value": "##ALERTTYPE##"
            }, {
                "name": "Status",
                "value": "##ALERTSTATUS##"
            }, {
                "name": "Host",
                "value": "##HOST##"
            }, {
                "name": "Start",
                "value": "##START##"
            }, {
                "name": "URL",
                "value": "[##ALERTDETAILURL##](##ALERTDETAILURL##)"
            }],
                       "text": "##MESSAGE##"
        }],
     }

     

    Click <Save> and test ?.

    Of course the body is customisable, but at least this one is working. Feel free to adapt according your needs.

    Kind regards,

    JEroen