-: Hey, what's up, Gurus?
Welcome to the lesson, Configuring Monitoring Services.
In this lesson, I am going to start talking to you
about how we collect data in Azure.
We're going to do that by taking a look at Azure Monitor
in a few different services.
In addition, I'm going to take a little bit of time
and I'm going to walk through Log Analytics.
We're going to talk a little bit about what it is
and when you actually need to use it.
So to start off with,
let's talk about how we start collecting data in Azure.
Well, the good news is, hey, you already are.
Anytime you create a service in Azure,
Azure Monitor is going to collect data for you.
Now, the deal is, it's going to collect
up to 90 days of data.
Beyond that point,
that data is lost unless you are using Log Analytics,
or you're moving that data somewhere.
So with Azure Monitor, you're going to generate activity
logs, platform metrics, resource logs,
and VM guest metrics and logs
if you're using virtual machines.
So this is the base of data
that Azure Monitor is going to generate for you
without you having to do anything.
So with that, let's jump over into the portal
and let me actually show you what I'm talking about.
So I have opened up a couple of different services here
and we'll just kind of jump through service by service.
So to start off with, we have a data factory here
and you can see on the left side, there is a monitoring tab.
This is Azure Monitor.
So I can come in here and I can create alert rules.
I can click on metrics
and I can actually create charts for myself.
Let's just click on something here.
I can start to create charts for myself,
and I can change time periods for those charts,
and I can create additional metrics for those charts.
So let's say I had my canceled pipeline runs there.
I could also come in and say,
yeah, let's go ahead and take a look
at our total entities count.
And I can see that right now I have, hey, 1 pipeline.
So you can build multiple different metrics,
add filters to it,
and that is all through Azure Monitor,
in your monitoring tab.
In addition, you can come into diagnostic settings.
Now, if I come here, I'm going to say,
hey, I want to do something above
and beyond the standard Azure Monitor.
And let's say that I want to take all of my data,
all kinds of different stuff,
and I want to send it to Log Analytics,
or I want to send it to a storage account,
or stream it to an event hub,
I can do all of those things here.
Now, when I do that through Log Analytics or something else,
I'm going to incur a cost
and that cost is going to be dependent
upon how much data I am moving,
and how long it sits in Log Analytics,
or storage account, or whatever I'm doing with it.
So keep in mind, I can do that here.
And if I was to do that,
I could just say
data factory logs
and save that.
And now it's going to update diagnostics
and it's going to start sending all
of that data that direction.
Now, moving on to the next service while that runs.
You can see in Synapse now my Azure Monitor tab
looks almost exactly the same.
Wildly different service
but almost the exact same types
of data from the metrics, alerts, diagnostic settings.
We get advisor recommendations here because this is Synapse
but the bulk of Azure Monitor stays the exact same.
That even actually carries through,
if I come over here, into a storage account.
You can see that for the most part,
I have alerts, metrics, diagnostic settings,
and my logs again,
and then I also have workbook and insights
that's going to be specific to storage.
And I'll show you in Log Analytics
how we can utilize our workbooks there as well.
But for the most part,
Azure Monitor stays the exact same from service to service
and the way it presents itself stays pretty similar as well.
So, that's how Azure Monitor looks in Azure,
through a couple of different services.
Let's now talk a little bit about Log Analytics.
So Log Analytics actually is a subset
of Azure Monitor.
It actually sits under Azure Monitor.
It does cost money like we talked about.
Again, that's based upon the amount of data that I'm moving
and how long it is staying in storage,
but Log Analytics allows me to get some advanced
functionality. So what is Log Analytics?
Well, at the core,
it's a tool in the Azure portal
and it lets us run and edit queries
from data collected by those Azure Monitor logs.
So that's what Azure Monitor is.
Now, when do I need it?
Well, 2 reasons really.
The first is long-term storage.
Like I said, Azure Monitor only stores 90 days of data.
If you need long-term data logs,
then you're going to need to move it somewhere
and Log Analytics is a perfect solution for that.
The second reason is complex queries.
You can run some basic queries in Azure Monitor
but if you want to do complex queries,
you need to take a look at Log Analytics.
So with that, let's jump back in
and I'm actually going to show you Log Analytics in the
portal, and we can kind of see some of the differences.
All right, so jumping back over into the portal,
let's click on our Log Analytics workspace
and you can see here
that we have quite a bit more information
that we can go through through and look at,
but the real key is going to be in this Workbooks section.
So I can come into my Workbooks section
and I can create some very complex queries,
and I can use that to get detailed insight on exactly
what's important to me,
and then again, I can store that information
for as long as I need to store it.
So we don't need to take a look
into actual queries right now
because queries are very unlikely to be on the DP-203.
Really, for Log Analytics,
there's not a whole lot that you need to remember
from the portal other than just kind
of understanding the difference
between Azure Monitor and Log Analytics
and when you would use one over the other.
So with that, let's jump back into the lesson
and let's kind of wrap everything up,
talking about key points for the DP-203.
1. Data is already collected by default in Azure.
That's Azure Monitor.
It's going to create
and collect data for all Azure services.
Second, it's going to collect data,
remember activities, platform, metrics, resources,
and then virtual machine stuff.
And then Log Analytics.
That's an additional resource that does cost money
and it sits under Azure Monitor
and again, it allows you to store data past 90 days
and it allows for very complex analysis
to get exactly the detail that you're looking for.
If you keep those 3 points in mind,
that's all you need to know for the DP-203.
And with that, hey, let's jump on
and talk about the next lesson.
I'll see you there.