Azure Monitor : What I learned!
The Microsoft definition of Azure Monitor is a comprehensive solution for collecting, analysing, and acting on telemetry from your cloud and on-premises environments. But what exactly this really mean? Good logging and reporting are often not implemented at all in many project because many reasons.
Azure Monitor is the service that allows developers and DevOps engineers to make a stronger argument for making Monitoring a first-class citizen because of its efficiency, variety of features.
Azure Monitor can be divided into 3 main areas:
- Insights : Azure Monitor includes several features that provide valuable insights into your applications and other resources that they depend on.
- Visualisations : such as charts and tables are often critical when plotting sense from huge data.
- Optimisations : Based on the Insights and analysis of the data, optimisation takes place and need to respond right a way.
There are three fundamental sources of metrics collected by Azure Monitor. Each one of these sources are a part of a stack of sorts.
- At the bottom of the stack, we have what’s known as platform metrics.
- At the next level up, we have guest OS metrics. These types of metrics are collected from the guest operating system of a VM.
- Top level have application metrics, which are created by Application insights for any applications you wish to monitor.
Just like metrics, there are a number of sources that logs are generated from.
- Azure Tenant : Any activity that flows through the AD audit log or the AD activity log can be funneled into the Azure Monitor for consumption.
- Azure Resources : These Resources are quite broad, but it encompasses any kind of service that Azure provides, and it’s meant to be sort of a catchall.
- Virtual Machine : All the logs about Windows and Linux VM
- Applications : Request and exceptions, Usage and Performance, Trace data and availability.
- Insights : VM, Containers, Storage and SAP
- Security : Security Center and Sentinel
Application Insights is a multi‑platform application performance monitoring solution for web applications, and this will help you troubleshoot and improve performance.
So what is monitored as a part of Application Insights:
- Request rates, response times, failure rates,
- Page views, load performance, performance counters,
- Dependency rates, response times, failure rates,
- AJAX calls,
- Host diagnostics, diagnostic trace logs, exceptions,
- User and session counts, and custom events and metrics.
Identify Performance issues
Performance Panel of Application Insight gives us a dashboard that shows the performance and details of the operations in our application. It also includes account and average duration of each application, or each operation.
Profiler has traces that help identify all the way down to the code level and helps identify where the time is spent in the code during operations, and this helps you discover those performance issues and really narrow that down.
Log Analytics allows you to collect and analyze data that’s generated by your resources either in Azure or on‑premises.
Apdex (Application Performance Index)
Apdex analyzes your app’s performance against the common set thresholds, and then it will summarize the insights to tell you if you’re meeting user satisfaction or not.
Application Map, it’s displaying your application’s topology and the dependencies and then performance information. Application Map is really to help you identify bottlenecks, faulty components in your application from a visual perspective.
Actionable feedback is alerting on predictable issues that DevOps teams can go and take action on versus noisy alerts that just sit out there, DevOps teams are looking at these alerts and they’re not really meaningful, they’re not actionable, so there aren’t steps that they can easily take to go ahead and resolve those issues.
Automation with Alerts
we may have a need to go ahead and fire off an automation right along with that alert, and so a good example there is maybe you’re monitoring a service or maybe you’re monitoring a web app, and if the monitoring detects that the web app is down or the service is down, you want to have automation go ahead and restart that web app or that service. So there are several different automation services within Azure that we can integrate with:
- Azure Automation runbooks.
- Azure Functions.
- Logic Apps
- And the last is a webhook.
Action groups allow you to set notifications or actions, and these will execute when an alert is triggered within Azure Monitor.