Last week, Microsoft released its newest feature: Azure monitor. This new platform service provides monitoring for single Azure resources and can visualize, query, route, archive, and take action on the metrics and logs coming from those resources. Working in an enterprise environment, I am curious to explore how this feature provides an added value to cloud integration. In this post, I’d therefore would like to point out some interesting properties! Personally, I’ll mainly use Logical apps to investigate Azure Monitor, but those technics are, of course, applicable to other Azure resources as well.
Azure Monitor focuses on one specific single resource and is thus very accessible to configure. If you would like to analyze and get insights across various Azure resources and multiple subscriptions, the existing feature Log Analytics may be a better fit.
Azure Monitor – Activity Log
The activity log describes all operations performed on resources in the subscription. It collects information on the what-who-and-when for any write operations on resources in the subscription, providing a baseline and information stream for all tooling included in Azure Monitor. All data, logs and metrics can be consolidated in raw from the web portal. As such, the Azure monitor activity log collects information on:
- Application: Logs and metrics
- Application and Guest OS: Diagnostics and logs
- Guest OS: Metrics
- Infrastructure: Audit / Activity logs
Much appreciated is the fact that the information is real-time available and integrates well with other Azure products or third party visualization tools using either live streaming or reading data from an archive in Azure storage. Additionally, the information stream can be routed to Azure Event Hubs and is directly accessible by any application.
Azure Monitor – Dashboard Metrics
All the information collected from the activity log metrics can be visualized per resource in the metrics section. Since one of my logical apps fails from time to time, I am particularly interested in its success rate.
To find out more, let’s first navigate to the metrics section and select the resource. Next, we select the values which are interesting to us. Choose from various types of data collection points to visualize your result.
The metrics provide some easy going statistic generation without any complexity. I hope that the chart types will be extended in the future, as we are now limited to Bar and Line choises.
Another cool feature I like is the integration with Microsoft Azure’s dashboard, which allows to deploy the current metrics chart directly to the dashboard by a single click on the “Pin to dashboard” button!
Azure Monitor – Alerts
Based on the info provided by the monitor activity log and metric values, Microsoft Azure can execute email and URL alerts if or when a certain threshold exceeds the desired value. Configure your threshold by using:
- Metric values: an alert is triggered when a specific event happens based on a threshold.
- e.g., CPU of resource > 90% during 5 minutes, my logic app fails, …
- Activity log events: an alert is triggered when a specific event happens in the log.
- e.g., A machine has been shut down.
Using this feature allows you to set up or configure some interesting features:
- Autoscale of compute instances based on the load
- Start an Azure runbook in Azure automation to perform any variety of tasks
- Send emails when a metric crosses a desired value or threshold
- Call a webhook (url) to execute any custom defined action
In our scenario, I’ll set up an email notification, which will alert me in case my logical app execution fails.
To do so, navigate to the alerts section and select the resource. If no diagnostics have been configured yet, configure this action to enable the alerts notification functionality.
Once diagnostics is in place, create a new alert using the button “add metric alert”. Provide your specific values. In our case study, I am interested to find out whether or not my application failed more than five times over the last fifteen minutes.
Whenever the setup threshold is exceeded, you’ll receive an email. Unfortunately, I also have to add that the preview version does come with some bugs – as shown by the picture down below.
Going one step further
The monitoring strategy can be further extended using other tools available in Microsoft Azure. These will provide an extra layer of information or analytics on top of Azure Monitor and thus allow you to collect more detailed information. I’d recommend:
- Log Analytics to collect and analyze real-time data generated by resources in cloud and on-premises environments.
- Application Insights (monitoring) for visualization, diagnostics, query, alerting, auto scale and automation of Azure infrastructure.
I’m especially impressed by the high accessibility of Microsoft Azure monitor: no complex configuration is required at all. It is easy to set up and perfectly suitable for even smaller scenario’s. At the same time, it can be integrated with Azure Insights monitoring or third party tools if you need to further explore this monitoring scenario. The application logs where already accessible in the past, but very shredded available. Having the information in real-time available in one portal, only adds to Microsoft Azure’s value.
But of course, since this is only a preview release, one can expect to encounter some small bugs in its functionality. In summary, I’m definitely looking forward to the next release.