Sitecore topologies(9.0.2) officially provided at https://kb.sitecore.net/articles/267409 contains the below Azure resources
Looking at an overall Sitecore topology the below would be an architectural representation of the monitoring story. App Insights collects the telemetry from all the web apps and measures web app availability. Azure monitor helps in configuring alerts and metrics. Azure Health Alerts gives the flexibility to monitor the availability of azure specific services which can help to notify customers during an outage in a data center and in a scenario where only a specific azure service is out of service.
For the scope of this blog, i am not covering infrastructure monitoring using log analytics.
Sitecore environments deployed a resource group can be monitoring using App Insights, Azure metrics and Azure Monitor and we use use the Azure Dashboards to give a unified view of the performance metrics and statistics of all the azure resources within a topology.
Some features that Sitecore developers have to enable to leverage the monitoring capabilities in Azure.
Enable the Application map feature in App Insights by uncommenting the below code snippet in the ApplicationInsights.Config in the sitecore web app instances
<!-- Uncomment the following line to enable dependency tracking -->
<!-- <Add Type="Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule, Microsoft.AI.DependencyCollector"/> -->
<! -- cut a lot if information -->
2. Configure azure availability web tests(URL ping tests) in the azure portal to monitor the overall website availability
3. Metrics for web apps, Azure SQL databases, Redis cache and Azure search can be configured in the azure portal. For all the above resources we can configure the azure metrics for each above mentioned azure resources using the Metrics menu option.
Add metric option allows the metric selection and ability to add multiple charts for the same resource.
Once the required dashboards are added, “Pin to current dashboard” option adds the chart to the default azure dashboard.
Once you start configuring the required metrics for azure resources, you should be able to see a complete dashboard as shown below. For more clarity and simplicity i have updated the dashboard json for the below sitecore environment in Github at Sitecore-Azure-Monitoring . Few steps to make it work for you
Azure Monitor gives the capability for alerting and notifications on metrics and logs as described in monitoring data sources. Azure monitor gives a cumulative monitoring on top of the below services
For each azure resource while adding the metrics for monitoring, a new alert rule can be created by specifying a condition for
An action group is a collection of notification preferences defined by the owner of an Azure subscription. Azure Monitor and Service Health alerts use action groups to notify users that an alert has been triggered.
Once the alert is configured along with alert condition and notification requirements, you would see the metric alert rule created as below.
Service Health tracks three types of health events that may impact your resources:
By adding an Action group at a resource group level the action group can be used for any notifications related to the resource group.
Once the action group is created, the service alert can be created at a specific or multiple azure resources Ex: App Service , Web apps , SQL databases as shown below
Hope this help!!.