Hey, what's up, Gurus.
In this lesson, we are going to take just a few minutes
and we're going to talk about
Monitoring for Performance and Functional Regressions.
What does that mean?
Well, in this lesson, I'm going to talk to you about
how we monitor jobs and queries and Stream Analytics.
We're going to talk a little bit about
what you can monitor in Stream Analytics.
Then we're going to talk about customizing that monitoring.
And then finally, we're going to take a very fast look
at setting alerts in Stream Analytics.
The real key for this lesson
is going to be seeing it in the portal.
So, my best piece of advice for this section,
we're actually going to talk more about analytics
and monitoring coming up here in a couple of sections.
But my real key takeaway for this lesson would be
understand what you can monitor
and get just a little bit of a feel
how you do that in the portal.
If you've got a sense of those 2 things
you should be good to go.
All right, so with that, some of the metrics
that you can monitor in Stream Analytics.
CPU percentage.
We can take a look at input events.
So if we want to see early events
or late events or out-of-order events,
we've been talking some about that.
Well, we can set up monitoring
to kind of see what's happening there.
We can take a look at runtime errors
to see if there's issues there.
We can take a look at our function requests
and how that's performing.
The all important streaming units % utilization.
That's going to tell you if you need to ramp up
or ramp down your streaming units,
which obviously directly affects your costs.
So that's going to be a very critical piece of data
that you want to look at as well.
And then finally, some things like watermark delays, right?
So with that, I'm just going to hop on over
and I'm going to show you this in the portal.
This is going to be a pretty fast lesson.
So let's take a look at how we monitor
some of those types of metrics.
How we can customize that monitoring,
and then how we can set
just some basic alerts for ourselves.
So, I'm going to jump over and here
we find ourselves in the portal.
I have, actually, turned on a job
and it is, actually, running right now as we do this lesson.
So you can see the monitoring that's happening here,
and our resource utilization right there.
Now what I've done is just ran a very simple query.
It's literally just passing the data through.
The focus here is not on that query,
the focus is on the monitoring.
So let's take a look and kind of dive in
and see some things that we can do.
So, first off, we can scroll down here on the left
and you can see our monitoring section.
And we can also click here on these charts
and get to some metrics that way as well.
So if I click on Metrics,
it's going to open up a brand new chart for me,
so I can see that.
Or, over here in this overview, again,
I can click on this chart here
and it's actually going to open it up
and I can make some changes here as well.
So you have a couple of choices for you.
And we're going to go back though,
and we're going to do metrics,
and I'm just going to add a few things to a chart
and see what this looks like.
So for our scope, I'm going to choose test.
I can choose all kinds of different things.
Test is just a Stream Analytics job
that I created for myself.
In my metric namespace,
I'm just going to leave it as standard metrics.
And then you can see we're already in here
at some of the things that we can look at.
So let's take a look at streaming unit utilization.
And so you can see here, we are flat at 7%,
which means that I am not using nearly what I could use
so I could probably ramp down
my streaming units a little bit,
if that continues as a trend over time.
We can also take a look at out-of-order events.
Luckily we don't have any,
so that's something to be aware of.
Same thing for input events.
You can see here, a big spike as I turn this thing on.
And the other thing to look at here as well
is up in this right-hand corner,
I can change my timeframes.
So let's just say that I want to
look at the last 30 minutes.
Click that, and you can see it gives me
a little better view on my chart,
which, again, is actually, running live right now.
And then I can go ahead and add in an additional metric.
Let's say that we are interested in taking a look at
late input events and you can see there's none there,
which is good.
And then let's say we also want to just have
a running look at our run
or a running look at our watermark delays
so I can turn that on as well.
And so you can see here that right now
there is no watermark delay.
It's at 0 seconds, 0 late inputs.
And down here, you can also see that we have a sum so far
of 3,087 input events to date.
So you can see here, we've done some very quick metrics,
which is awesome.
That's how you build charts.
And you'll see that in just about every Azure service.
For the DP-203, if you just understand
the basics of what you can do,
I think that's going to be helpful.
I could also go into Monitoring and I could go to Logs
and I could start to run some basic queries on my data.
And you can see there's all kinds
of sample queries here that I can use.
And so that's something else that
you can take advantage of.
Lastly, I want to take a look at some alert rules.
So under alert rules, I could choose New Alert Rule here.
It's already got my resource set up
and I can go in and add a condition.
So let's say for example,
I was interested in
looking at runtime errors.
And so, if I start getting runtime errors in
I want to take a look and be notified
that that's actually happening.
So you can see that it's going to pull it up for me.
And so currently, there's no runtime errors, which is good,
but I could take a look at that if I was so inclined.
And let's say that if I start getting those
if I have more than 50 errors,
I want to know.
So it's going to take a look at a 5-minute period.
If it goes over 50, it's going to do something.
It's going to do an action.
And we can define what that action is here,
by just going to adding an action group.
I can choose this, for example.
And if I chose that, it would automatically be set up
to send 2 emails to the Azure manager roles.
So let's say we want to do that.
And then I could just go in
and I could give myself
a alert rule name.
So let's just say that
Runtime Errors is the name.
And then I could come down here
and just click on Create alert rule.
That's it.
So if we do that, we've now created an alert.
We've also taken a look at how metrics work
in Azure Stream Analytics.
And so with that, I'm going to jump on back over
and we're going to finish out our lesson.
So let's go through and review what we learned.
First, Know What You Can Monitor.
You don't need to know everything,
but just the basics of the types of things
that you can monitor.
Understand key metrics.
So events, we looked at that.
Looking at our stream units,
streaming units, our utilization.
Looking at watermarking.
Looking at our errors.
Those are some of the critical metrics
that you want to understand of--
Those are some of the critical metrics
that you need to know about.
Finally, alert strategies.
So the basics of how an alert is set.
It's going to be the same on pretty much
every service in Azure.
So if you understand the basics
you should be good to go for that.
And you should be good to go for this lesson
keeping in mind that we'll dive in later
into metrics at a deeper level for the DP-203,
but for Azure Stream Analytics,
that's all you need to know.
So with that, we'll end this lesson and jump onto the next.
See you there.