Sitecore topologies(9.0.2) officially provided at https://kb.sitecore.net/articles/267409 contains the below Azure resources
- Azure web app
- Azure SQL Database
- Azure Search
- Azure Redis cache
- Azure Application Insights
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
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
- Make sure the sitecore topology is deployed in a resource group in your azure subscription using Marketplace Sitecore Experience cloud.
- Download the file
- Replace the subscription id “xxxxxxxxx-xxxx-xxx-xxxx-xxxxxxxxxxxx” with relevant subscription id that you will be using for creating the dashboard
- Replace the text “resourceGroups/ga-sea-exsmall-xp-rg” with the “resourceGroups/your-resourcegroup-name” in the json file.
- Replace the other relevant azure resource name as required and upload the updated file in azure portal.
- Metric values supported by Azure Metrics
- Log search queries supported by Log analytics
- Activity Log events supported by Log analytics
- Azure Service Health alerts
- web site availability test supported by App Insights
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 EVENTS
Service Health tracks three types of health events that may impact your resources:
- Service issues – Problems in the Azure services that affect you right now.
- Planned maintenance – Upcoming maintenance that can affect the availability of your services in the future.
- Health advisories – Changes in Azure services that require your attention. Examples include when Azure features are deprecated or if you exceed a usage quota.
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!!.