Hi there, Bruno Gabrielli here again to talk about how to get alert notification using a Teams channel.
I apologize because this is going to be a long post with all the steps to achieve the notification goals, so please bear with me if you’re interested in getting the configuration done.
Lots of customers are using Teams channel as notification mechanism in their alert management process. They find it very helpful because Teams can be used over mobile devices and browsers without relying on your company laptop. Apparently, there’s no built-in activity in Azure Monitor out of the box to notify an alert via Teams, but we DO have all the pieces that we need.
In this post I will drive you through the Azure Monitor configuration which is behind the Teams channel alert notification mechanism.
First and foremost, a Teams and a Teams channel need to exist. We will not cover this part since it is out of scope, however, should you need information on how to accomplish the pre-requisites you can rely on the following articles:
With that said, here we are with some steps that will be completed in the Azure portal. Let’s see them in detail.
Step 1: Create a blank Logic App
For this step, you need to login to the Azure portal and create a new Logic App. For the purpose of this article, I decided to name it SendAlertNotificationToTeamsChannel, but you can choose the name you prefer the most and according to the company standard you have in place.
Step 2: Configure the Logic App
In this post, since I got everything correctly parsed from the trigger activity (the When a HTTP request is received), I will go use the dynamic content only. For instance, after heving put some text like – Alert Id: I will select alertId content from the list
Step 3: Configure the Action Group
Now that the Logic App has been created, we need to configure an Action Group to use it in order receive our alerts as expected.
From the Azure Monitor blade, follow the steps below:
, making sure to enable the common alert schema and select
Step 4: Add the new action group to your alerts
Now that we have the Action group created and configured, we need to add it to all the alerts we want to notify:
Step 5: Test, test, test
As always when re-using something from others, we gotta make sure it works in our environment. What’s better than a deep test session? Play with the alert rules you configured to generate some alert and see if it gets notified. If everything went smoothly, we should get notifications similar to the one below in our Teams:
Hope that will make the Alert Management process as well as the Notification process easier and usable enough.
Thanks for reading through the entire loooooong post
The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.