1 00:00:00,840 --> 00:00:02,060 Hey, what's up, Gurus. 2 00:00:02,060 --> 00:00:04,990 In this lesson, we are going to take just a few minutes 3 00:00:04,990 --> 00:00:05,990 and we're going to talk about 4 00:00:05,990 --> 00:00:10,270 Monitoring for Performance and Functional Regressions. 5 00:00:10,270 --> 00:00:11,520 What does that mean? 6 00:00:11,520 --> 00:00:13,970 Well, in this lesson, I'm going to talk to you about 7 00:00:13,970 --> 00:00:17,290 how we monitor jobs and queries and Stream Analytics. 8 00:00:17,290 --> 00:00:18,360 We're going to talk a little bit about 9 00:00:18,360 --> 00:00:21,360 what you can monitor in Stream Analytics. 10 00:00:21,360 --> 00:00:23,960 Then we're going to talk about customizing that monitoring. 11 00:00:23,960 --> 00:00:26,910 And then finally, we're going to take a very fast look 12 00:00:26,910 --> 00:00:30,260 at setting alerts in Stream Analytics. 13 00:00:30,260 --> 00:00:32,650 The real key for this lesson 14 00:00:32,650 --> 00:00:35,270 is going to be seeing it in the portal. 15 00:00:35,270 --> 00:00:40,190 So, my best piece of advice for this section, 16 00:00:40,190 --> 00:00:42,950 we're actually going to talk more about analytics 17 00:00:42,950 --> 00:00:46,280 and monitoring coming up here in a couple of sections. 18 00:00:46,280 --> 00:00:50,100 But my real key takeaway for this lesson would be 19 00:00:50,100 --> 00:00:52,300 understand what you can monitor 20 00:00:52,300 --> 00:00:54,380 and get just a little bit of a feel 21 00:00:54,380 --> 00:00:56,260 how you do that in the portal. 22 00:00:56,260 --> 00:00:58,380 If you've got a sense of those 2 things 23 00:00:58,380 --> 00:00:59,630 you should be good to go. 24 00:01:00,830 --> 00:01:03,260 All right, so with that, some of the metrics 25 00:01:03,260 --> 00:01:06,140 that you can monitor in Stream Analytics. 26 00:01:06,140 --> 00:01:07,770 CPU percentage. 27 00:01:07,770 --> 00:01:10,150 We can take a look at input events. 28 00:01:10,150 --> 00:01:12,290 So if we want to see early events 29 00:01:12,290 --> 00:01:14,190 or late events or out-of-order events, 30 00:01:14,190 --> 00:01:16,180 we've been talking some about that. 31 00:01:16,180 --> 00:01:18,030 Well, we can set up monitoring 32 00:01:18,030 --> 00:01:20,270 to kind of see what's happening there. 33 00:01:20,270 --> 00:01:21,890 We can take a look at runtime errors 34 00:01:21,890 --> 00:01:23,740 to see if there's issues there. 35 00:01:23,740 --> 00:01:26,170 We can take a look at our function requests 36 00:01:26,170 --> 00:01:27,930 and how that's performing. 37 00:01:27,930 --> 00:01:32,040 The all important streaming units % utilization. 38 00:01:32,040 --> 00:01:34,850 That's going to tell you if you need to ramp up 39 00:01:34,850 --> 00:01:36,930 or ramp down your streaming units, 40 00:01:36,930 --> 00:01:39,810 which obviously directly affects your costs. 41 00:01:39,810 --> 00:01:43,350 So that's going to be a very critical piece of data 42 00:01:43,350 --> 00:01:45,500 that you want to look at as well. 43 00:01:45,500 --> 00:01:49,000 And then finally, some things like watermark delays, right? 44 00:01:49,000 --> 00:01:51,180 So with that, I'm just going to hop on over 45 00:01:51,180 --> 00:01:52,750 and I'm going to show you this in the portal. 46 00:01:52,750 --> 00:01:54,500 This is going to be a pretty fast lesson. 47 00:01:54,500 --> 00:01:55,970 So let's take a look at how we monitor 48 00:01:55,970 --> 00:01:57,990 some of those types of metrics. 49 00:01:57,990 --> 00:01:59,730 How we can customize that monitoring, 50 00:01:59,730 --> 00:02:00,660 and then how we can set 51 00:02:00,660 --> 00:02:02,863 just some basic alerts for ourselves. 52 00:02:04,240 --> 00:02:06,080 So, I'm going to jump over and here 53 00:02:06,080 --> 00:02:07,780 we find ourselves in the portal. 54 00:02:07,780 --> 00:02:10,610 I have, actually, turned on a job 55 00:02:10,610 --> 00:02:14,380 and it is, actually, running right now as we do this lesson. 56 00:02:14,380 --> 00:02:17,320 So you can see the monitoring that's happening here, 57 00:02:17,320 --> 00:02:20,570 and our resource utilization right there. 58 00:02:20,570 --> 00:02:24,150 Now what I've done is just ran a very simple query. 59 00:02:24,150 --> 00:02:26,823 It's literally just passing the data through. 60 00:02:27,930 --> 00:02:29,990 The focus here is not on that query, 61 00:02:29,990 --> 00:02:31,810 the focus is on the monitoring. 62 00:02:31,810 --> 00:02:34,160 So let's take a look and kind of dive in 63 00:02:34,160 --> 00:02:35,910 and see some things that we can do. 64 00:02:37,010 --> 00:02:39,830 So, first off, we can scroll down here on the left 65 00:02:39,830 --> 00:02:42,080 and you can see our monitoring section. 66 00:02:42,080 --> 00:02:44,840 And we can also click here on these charts 67 00:02:44,840 --> 00:02:47,870 and get to some metrics that way as well. 68 00:02:47,870 --> 00:02:49,990 So if I click on Metrics, 69 00:02:49,990 --> 00:02:52,590 it's going to open up a brand new chart for me, 70 00:02:52,590 --> 00:02:54,700 so I can see that. 71 00:02:54,700 --> 00:02:59,070 Or, over here in this overview, again, 72 00:02:59,070 --> 00:03:01,690 I can click on this chart here 73 00:03:01,690 --> 00:03:02,950 and it's actually going to open it up 74 00:03:02,950 --> 00:03:05,800 and I can make some changes here as well. 75 00:03:05,800 --> 00:03:08,720 So you have a couple of choices for you. 76 00:03:08,720 --> 00:03:10,480 And we're going to go back though, 77 00:03:10,480 --> 00:03:11,470 and we're going to do metrics, 78 00:03:11,470 --> 00:03:13,670 and I'm just going to add a few things to a chart 79 00:03:13,670 --> 00:03:15,610 and see what this looks like. 80 00:03:15,610 --> 00:03:18,900 So for our scope, I'm going to choose test. 81 00:03:18,900 --> 00:03:20,750 I can choose all kinds of different things. 82 00:03:20,750 --> 00:03:22,630 Test is just a Stream Analytics job 83 00:03:22,630 --> 00:03:24,123 that I created for myself. 84 00:03:25,020 --> 00:03:27,300 In my metric namespace, 85 00:03:27,300 --> 00:03:29,700 I'm just going to leave it as standard metrics. 86 00:03:29,700 --> 00:03:31,820 And then you can see we're already in here 87 00:03:31,820 --> 00:03:33,700 at some of the things that we can look at. 88 00:03:33,700 --> 00:03:37,370 So let's take a look at streaming unit utilization. 89 00:03:37,370 --> 00:03:41,830 And so you can see here, we are flat at 7%, 90 00:03:41,830 --> 00:03:46,590 which means that I am not using nearly what I could use 91 00:03:46,590 --> 00:03:48,320 so I could probably ramp down 92 00:03:48,320 --> 00:03:50,120 my streaming units a little bit, 93 00:03:50,120 --> 00:03:53,013 if that continues as a trend over time. 94 00:03:54,450 --> 00:03:57,740 We can also take a look at out-of-order events. 95 00:03:57,740 --> 00:03:59,660 Luckily we don't have any, 96 00:03:59,660 --> 00:04:02,010 so that's something to be aware of. 97 00:04:02,010 --> 00:04:03,990 Same thing for input events. 98 00:04:03,990 --> 00:04:07,900 You can see here, a big spike as I turn this thing on. 99 00:04:07,900 --> 00:04:10,010 And the other thing to look at here as well 100 00:04:10,010 --> 00:04:12,000 is up in this right-hand corner, 101 00:04:12,000 --> 00:04:14,610 I can change my timeframes. 102 00:04:14,610 --> 00:04:16,440 So let's just say that I want to 103 00:04:16,440 --> 00:04:18,840 look at the last 30 minutes. 104 00:04:18,840 --> 00:04:20,350 Click that, and you can see it gives me 105 00:04:20,350 --> 00:04:23,160 a little better view on my chart, 106 00:04:23,160 --> 00:04:26,193 which, again, is actually, running live right now. 107 00:04:27,390 --> 00:04:31,070 And then I can go ahead and add in an additional metric. 108 00:04:31,070 --> 00:04:35,870 Let's say that we are interested in taking a look at 109 00:04:37,440 --> 00:04:40,650 late input events and you can see there's none there, 110 00:04:40,650 --> 00:04:41,593 which is good. 111 00:04:42,540 --> 00:04:45,300 And then let's say we also want to just have 112 00:04:45,300 --> 00:04:47,947 a running look at our run 113 00:04:50,830 --> 00:04:54,730 or a running look at our watermark delays 114 00:04:54,730 --> 00:04:56,070 so I can turn that on as well. 115 00:04:56,070 --> 00:04:57,690 And so you can see here that right now 116 00:04:57,690 --> 00:04:59,300 there is no watermark delay. 117 00:04:59,300 --> 00:05:02,650 It's at 0 seconds, 0 late inputs. 118 00:05:02,650 --> 00:05:06,580 And down here, you can also see that we have a sum so far 119 00:05:06,580 --> 00:05:11,580 of 3,087 input events to date. 120 00:05:11,790 --> 00:05:14,460 So you can see here, we've done some very quick metrics, 121 00:05:14,460 --> 00:05:15,990 which is awesome. 122 00:05:15,990 --> 00:05:17,910 That's how you build charts. 123 00:05:17,910 --> 00:05:20,900 And you'll see that in just about every Azure service. 124 00:05:20,900 --> 00:05:23,670 For the DP-203, if you just understand 125 00:05:23,670 --> 00:05:25,290 the basics of what you can do, 126 00:05:25,290 --> 00:05:27,410 I think that's going to be helpful. 127 00:05:27,410 --> 00:05:32,320 I could also go into Monitoring and I could go to Logs 128 00:05:32,320 --> 00:05:36,600 and I could start to run some basic queries on my data. 129 00:05:36,600 --> 00:05:37,750 And you can see there's all kinds 130 00:05:37,750 --> 00:05:40,580 of sample queries here that I can use. 131 00:05:40,580 --> 00:05:41,840 And so that's something else that 132 00:05:41,840 --> 00:05:43,173 you can take advantage of. 133 00:05:44,550 --> 00:05:47,120 Lastly, I want to take a look at some alert rules. 134 00:05:47,120 --> 00:05:51,500 So under alert rules, I could choose New Alert Rule here. 135 00:05:51,500 --> 00:05:53,780 It's already got my resource set up 136 00:05:53,780 --> 00:05:55,510 and I can go in and add a condition. 137 00:05:55,510 --> 00:05:57,030 So let's say for example, 138 00:05:57,030 --> 00:05:58,570 I was interested in 139 00:05:58,570 --> 00:06:03,110 looking at runtime errors. 140 00:06:03,110 --> 00:06:06,030 And so, if I start getting runtime errors in 141 00:06:06,030 --> 00:06:08,270 I want to take a look and be notified 142 00:06:08,270 --> 00:06:09,990 that that's actually happening. 143 00:06:09,990 --> 00:06:11,920 So you can see that it's going to pull it up for me. 144 00:06:11,920 --> 00:06:15,310 And so currently, there's no runtime errors, which is good, 145 00:06:15,310 --> 00:06:18,900 but I could take a look at that if I was so inclined. 146 00:06:18,900 --> 00:06:22,160 And let's say that if I start getting those 147 00:06:22,160 --> 00:06:26,660 if I have more than 50 errors, 148 00:06:26,660 --> 00:06:28,420 I want to know. 149 00:06:28,420 --> 00:06:31,500 So it's going to take a look at a 5-minute period. 150 00:06:31,500 --> 00:06:35,780 If it goes over 50, it's going to do something. 151 00:06:35,780 --> 00:06:37,000 It's going to do an action. 152 00:06:37,000 --> 00:06:39,560 And we can define what that action is here, 153 00:06:39,560 --> 00:06:42,253 by just going to adding an action group. 154 00:06:43,250 --> 00:06:45,590 I can choose this, for example. 155 00:06:45,590 --> 00:06:48,050 And if I chose that, it would automatically be set up 156 00:06:48,050 --> 00:06:52,830 to send 2 emails to the Azure manager roles. 157 00:06:52,830 --> 00:06:55,000 So let's say we want to do that. 158 00:06:55,000 --> 00:06:56,170 And then I could just go in 159 00:06:56,170 --> 00:07:00,320 and I could give myself 160 00:07:00,320 --> 00:07:02,080 a alert rule name. 161 00:07:02,080 --> 00:07:05,152 So let's just say that 162 00:07:05,152 --> 00:07:09,380 Runtime Errors is the name. 163 00:07:09,380 --> 00:07:10,650 And then I could come down here 164 00:07:10,650 --> 00:07:13,023 and just click on Create alert rule. 165 00:07:13,970 --> 00:07:14,870 That's it. 166 00:07:14,870 --> 00:07:17,000 So if we do that, we've now created an alert. 167 00:07:17,000 --> 00:07:20,380 We've also taken a look at how metrics work 168 00:07:20,380 --> 00:07:22,690 in Azure Stream Analytics. 169 00:07:22,690 --> 00:07:24,830 And so with that, I'm going to jump on back over 170 00:07:24,830 --> 00:07:28,110 and we're going to finish out our lesson. 171 00:07:28,110 --> 00:07:31,040 So let's go through and review what we learned. 172 00:07:31,040 --> 00:07:33,430 First, Know What You Can Monitor. 173 00:07:33,430 --> 00:07:34,720 You don't need to know everything, 174 00:07:34,720 --> 00:07:36,770 but just the basics of the types of things 175 00:07:36,770 --> 00:07:38,063 that you can monitor. 176 00:07:39,300 --> 00:07:41,090 Understand key metrics. 177 00:07:41,090 --> 00:07:43,910 So events, we looked at that. 178 00:07:43,910 --> 00:07:46,640 Looking at our stream units, 179 00:07:46,640 --> 00:07:48,540 streaming units, our utilization. 180 00:07:48,540 --> 00:07:50,550 Looking at watermarking. 181 00:07:50,550 --> 00:07:52,200 Looking at our errors. 182 00:07:52,200 --> 00:07:54,670 Those are some of the critical metrics 183 00:07:54,670 --> 00:07:57,470 that you want to understand of-- 184 00:07:57,470 --> 00:07:59,040 Those are some of the critical metrics 185 00:07:59,040 --> 00:08:01,210 that you need to know about. 186 00:08:01,210 --> 00:08:03,400 Finally, alert strategies. 187 00:08:03,400 --> 00:08:07,510 So the basics of how an alert is set. 188 00:08:07,510 --> 00:08:09,490 It's going to be the same on pretty much 189 00:08:09,490 --> 00:08:11,710 every service in Azure. 190 00:08:11,710 --> 00:08:13,010 So if you understand the basics 191 00:08:13,010 --> 00:08:14,460 you should be good to go for that. 192 00:08:14,460 --> 00:08:16,490 And you should be good to go for this lesson 193 00:08:16,490 --> 00:08:18,800 keeping in mind that we'll dive in later 194 00:08:18,800 --> 00:08:22,880 into metrics at a deeper level for the DP-203, 195 00:08:22,880 --> 00:08:24,910 but for Azure Stream Analytics, 196 00:08:24,910 --> 00:08:26,060 that's all you need to know. 197 00:08:26,060 --> 00:08:28,980 So with that, we'll end this lesson and jump onto the next. 198 00:08:28,980 --> 00:08:30,237 See you there.