(electronic music)
- Coming up I'll show how you can take advantage
of the end-to-end full stack monitoring,
the advanced analytics and the machine learning
capabilities of Azure Monitor
to find and fix any issue with the health
and performance of your workload.
Now, whether you're running complex workloads
on Azure or embracing DevOps
you need that single monitoring tool
that gives you a 360-degree view
across the application code, infrastructure,
and network and allow teams and individuals to collaborate.
With Azure Monitor we have now
consolidated the various monitoring tools in Azure
to give you that holistic view of your application.
You notice for example, that Azure Log Analytics,
the advanced analytics tool, and Azure Application Insights,
the application performance monitoring tool,
are now integrated into Azure Monitor.
So how does Azure Monitor work?
Azure Monitor collects telemetry in the form
of metrics and logs from a number of sources.
Some of them are Azure-specific
but others such as Operating System
and Application are generic and
is applicable for any workload running anywhere.
In addition, you can inject your own custom data.
The data is stored in centralized logs and metric stores.
These stores are fully managed and optimized
for cost and performance.
With all your monitoring data in one place,
Azure Monitor provides end-to-end solutions
that streamlines the monitoring workflow
for canonical use cases such as
application performance monitoring,
container and VM monitoring.
Instead of the end-to-end insights,
you can just use the visualization and reporting features
or interact with the raw data using our
advanced analytics platform.
And you can enable automated alerts.
You can also use our built-in integrations
with ideas and tools like Service Now and other popular
dev ops and seam tools and you can also build
your own custom integration.
So all in all, you get an integrated experience with
intelligent insights and full interoperability
with your existing tools.
So now that we understand how Azure Monitor works,
let me walk you through an example
of how you use Azure Monitor and I'll point out
some of the latest updates along the way.
Let's start with alerts.
Alerts are a good way
to catch issues before they impact your customers,
but an alert is only as good as the threshold you set.
The right threshold should ideally catch
any deviation from expected behavior,
but knowing that expected behavior
is sometimes not humanly possible.
So how do we solve this?
Let's take an example.
Let's say you need to create an alert
on CPU usage for a VM.
Previously, I had to choose Static Threshold
and provide an exact threshold value.
That is difficult for patterns like this.
Instead now, I can choose Dynamic Threshold
and Azure Monitor will use machine learning
to automatically calculate the threshold for me
at an hourly granularity.
All that I need to do is choose how sensitive
I want the threshold to be
and I can go create the alert.
Instead of doing this individually for each and every VM,
what I can do is update the alert rule
and select all my VMs.
I can also apply this alert rule to any VM
that will be launched in the future in this resource group.
So I now have a single alert rule
that monitors the CPU usage across
all my VMs and I didn't even need to specify a threshold.
Dynamic thresholds will also take into account
factors such as seasonality as you can see here, and
of course over time with more data it keeps getting better.
So we have made alerts better and investigations
are always easier if you have an alert as a starting point.
But let's say you don't have any alerts
and your customers are complaining
about intermittent performance problems?
Let's look at the architecture
of the app that your customers are complaining about.
It's a simple three-tier app with the web tier,
an API tier and a database backing.
There is also a Redis Cache.
The Web and API tiers are running on VM scale sets.
Although it's a simple app, if you open up the resource
group there are 16 different types of resources.
So debugging a performance issue
can feel like looking for a needle in a haystack.
Thankfully Azure Monitor can help you.
I'm going to start with application insights
and see if there are any issues with the code.
The application map is my acute overview of the app
and I don't see any major issues.
Let's look at the performance of the app over time.
On an average the request duration looks good
but at the 99th percentile I see some delays.
I can pick a request that took time,
pick one of the samples and see the end-to-end trace.
It looks like the API tier is taking time
but again I don't see any issues with the code.
That leads me to think that this is an infrastructure issue,
and based on the tracing here my hypothesis
is that the API tier is the culprit.
So how do we debug an infrastructure issue
with Azure Monitor?
So with integrated monitoring
I can see all the metrics from different components
of the API tier in one place.
I want to look at Virtual Machines
and given Azure Monitor has an end-to-end
solution for Virtual Machines, I'm going to go there.
You'll see a lot of similarities here with
the Application Debug Experience.
Similar to the app map, we have a VM map.
It's a quick way to rule out any latency
or communication issues.
I can click on health
and it tells me that there aren't any health issues either.
I can click to performance.
I see some CPU spikes with one of the VMs
that's running my API tier.
So my theory is that the intermittent CPU spike
in one of the VMs in the API tier
is causing the performance problems with the application.
But how do I prove it?
This is where the Common Log Store and
Advanced Log Analytics comes into play.
One thing to note is that
this log store is used not just for monitoring,
it's used by a number of other tools
such as Azure Security Center and Azure Sentinel.
So you get to see all your security
and operational data in one place.
This is very helpful in a situation like ours
where we need to correlate data from
multiple sources to prove a hypothesis.
To interact with the data I'm going to use
a query language called Kusto Query Language, or KQL.
What I'm going to do is that
for that particular VM that I think
has an issue, I'm going to overlay
the app request duration with the CPU usage
and see if there are any patterns.
You can see that there's a near perfect
correlation between the CPU spikes
and the spike in request duration.
It is to the point where I think
I can safely establish causation.
The next step is to figure out
what was causing the CPU spike.
Again with integrative monitoring,
I have all the data right here.
So I'm going to run a KQL query
that shows the CPU usage by process
on that particular VM, and I can see
that the process Stress is the culprit.
So looks like there's a stress test
that is kicking off intermittently
on this particular VM that is causing
all these problems.
How do we fix this?
Given that the VM has been running for a while
and I don't know what else is wrong with it,
I'm hesitant to disable the process.
Since this VM is on a VM scale set,
I can just delete the VM and let VM scale set
launch a new VM on its behalf.
I have automation in place to deploy the code
to the new VM before it gets added to the load balances.
So in this example
we were able to traverse the entire application stack
from the code to the infrastructure,
use analytics to find the root cause
and resolve the issue without ever leaving the Azure Portal.
This is the benefit
of the integrated experience and
into the insights you get with Azure Monitoring.
But what if we are not using VMs
and using containers instead?
We have Azure Monitor for containers that gives you
integrated monitoring for Azure Kubernetes service
or AKS clusters and some powerful tools
to help you troubleshoot issues.
Again without ever having to log into the container.
We recently added support for Windows server containers
and for monitored clusters you can see a lot of information
including the CPU and memory usage
and the cluster node controller
and down to the container level.
You can see and interact with live lots
for containers and we recently added
the ability to view live Kubernetes events.
And if you want to see the log date
and run detailed queries, you can
always use log analytics.
So you may also be wondering
how to onboard your resources to Azure Monitor.
Azure Monitor provides native monitoring for Azure.
This means that for most Azure resources
you get out-of-the-box
telemetry without any instrumentation.
For certain resources such as VMs and containers,
and your application, you may want to get
addition telemetry and captive detail logs.
To learn more about onboarding such resources,
click the following links.
We hope that you start
using Azure Monitor today. Thanks for watching.
(electronic music)