Info |
---|
Microsoft announced the deprecation of connectors. See the Deprecation note Retirement of Office 365 connectors within Microsoft Teams |
...
- Click the three dots on a channel and select “Workflows”
- Choose “Post to a channel when a webhook request is received”
Choose a name for the workflow, e.g., “Checkmk”
Tip In order for the following to work, you must already have an MS Teams channel specified.
- Select team and channel where the webhook should post to. In this case, I have a team and channel by the name of Checkmk, so I chose this.
Copy the webhook URL
Panel borderColor #ffeaae bgColor #fffdf6 borderStyle solid title Not Mandatory If you want to test whether you can POST to this webhook from the monitoring server, then you can try to run this script as site user: I found a nice example with which you can check whether you can even post a message from the monitoring server to this webhook or not.
At the time of writing this article, this script works, however there is no guarantee that it will work when you try. There is a very high possibility that the format/syntax/endpoint changes and the script has to be adapted.
Note The script above will only work if you specify the Teams channel that was configured beforehand.
Code Block language bash theme RDark OMD[v23p13]:~$ ./test.sh “Webhook URL” “Workflows” “Default”“Teams_Channel” “Send from Checkmk.Happy Monitoring”
.
After this, let's move on to the Checkmk Notification configuration for teams and create a notification rule
Tip You may need to sanitize the encoding of the Webhook URL from MS Teams before pasting it into Checkmk.
e.g.,- Unsanitized
api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=g26 - Sanitized
api-version=2016-06-01&sp=/triggers/manual/run&sv=1.0&sig=g26
- Unsanitized
- Last but not the least, you can fake a check result:
Then you will see a message getting dropped in the corresponding Teams channel:
This is a confirmation that your test notifications are working
...