Search code examples
azurebotframeworkazure-application-insights

azure app insights alert to monitor health in a azure bot framework project


I need to configure an alert for an azure appservice resource where I have a bot created from the Microsoft bot framework, this is integrated into azure app insights.

My question is what parameter should I take to configure an azure app insights alert so that I can measure the health of my bot application properly and that it is within good practices?

enter image description here


Solution

  • In my opinion, if you wanna alert on machines that are not available, you can set application insights in your code and it will send heartbeat by default. And you can follow this tutorial to add telemetry to your bot.(Mainly add Microsoft.Bot.Builder.Integration.ApplicationInsights.Core NuGet package and modify ConfigureServices() method in Startup.cs and some other settings)

    After that, your bot program will send heartbeat, you can see details in app insights custom metrics via customMetrics | where name == "HeartbeatState". Then you can create alert rules on yourself.

    enter image description here