WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.200 --> 00:00:10.300
In this video, you'll learn some basics of monitoring on a

1
00:00:10.300 --> 00:00:10.800
 Lennox server.

2
00:00:12.100 --> 00:00:16.100
Plans to do a brief overview of Monitoring Solutions that come with Linux you

3
00:00:15.100 --> 00:00:18.100
 will use a few commands to probe your Linux host

4
00:00:18.100 --> 00:00:19.900
 to check CPU load and memory.

5
00:00:20.800 --> 00:00:23.400
Finally you head over to AWS console and

6
00:00:23.400 --> 00:00:26.400
 check out cloudwatch metrics for your ec2 instance. Okay,

7
00:00:26.400 --> 00:00:27.500
 let's get started.

8
00:00:29.600 --> 00:00:32.900
There are many ways you can monitor Olympics hosts.

9
00:00:32.900 --> 00:00:35.300
 In fact, there's a whole industry built around

10
00:00:35.300 --> 00:00:38.100
 this but for this course, I'm Gonna Keep it very simple.

11
00:00:39.100 --> 00:00:42.900
So let's we're going to think about monitoring. We're gonna think about it in three

12
00:00:42.900 --> 00:00:46.000
 stages. These three stages are gathering

13
00:00:45.400 --> 00:00:48.100
 reporting and alerting. So Gathering is

14
00:00:48.100 --> 00:00:51.900
 recording the metrics or state of your system. Yeah, I

15
00:00:51.900 --> 00:00:55.400
 think logs tracing time series data reporting is

16
00:00:54.400 --> 00:00:57.600
 the reviewing of the data and displaying

17
00:00:57.600 --> 00:00:59.900
 it, you know think about graphs on a wall.

18
00:01:00.800 --> 00:01:04.200
And the final stage of learning alerting when

19
00:01:03.200 --> 00:01:06.300
 they threshold is reached either

20
00:01:06.300 --> 00:01:09.100
 automatically fix the problem or page someone to take

21
00:01:09.100 --> 00:01:12.600
 a look at it. So we're going to cover the first two categories of

22
00:01:12.600 --> 00:01:15.000
 modernify inspecting and Gathering data of the

23
00:01:15.500 --> 00:01:16.700
 state of our lab host.

24
00:01:17.500 --> 00:01:20.400
Then I will show you how to create a very simple metrics dashboard

25
00:01:20.400 --> 00:01:23.600
 on the AWS console using cloudwatch metrics

26
00:01:23.600 --> 00:01:26.100
 that are already provided to you by idios by default.

27
00:01:26.900 --> 00:01:29.200
We're going to explore a few ways to

28
00:01:29.200 --> 00:01:32.300
 inspect your host using commands. You can find on any Linux server.

29
00:01:32.300 --> 00:01:35.700
 There are numerous commands to inspect your system.

30
00:01:35.700 --> 00:01:38.300
 So to keep this digestible we're going to

31
00:01:38.300 --> 00:01:41.600
 only focus on two. The two commands are top

32
00:01:41.600 --> 00:01:44.300
 in VM stat. You can find these commands in

33
00:01:44.300 --> 00:01:46.500
 the proc psng package.

34
00:01:47.400 --> 00:01:50.300
On our AWS house though. They should already be installed by

35
00:01:50.300 --> 00:01:50.700
 fall.

36
00:01:51.400 --> 00:01:54.400
So the First Command we're going to use like I said is top.

37
00:01:55.200 --> 00:01:58.500
And so the top command will display all the running

38
00:01:58.500 --> 00:02:01.700
 process information about all the running processes on your system.

39
00:02:02.500 --> 00:02:05.500
And you could do overviews like CPU memory

40
00:02:05.500 --> 00:02:08.500
 and load. So let's go ahead and run that so in your

41
00:02:08.500 --> 00:02:10.000
 terminal type in the top command.

42
00:02:11.400 --> 00:02:14.100
And as you can see this brings up a lot of

43
00:02:14.100 --> 00:02:17.500
 information and every five seconds by default, this

44
00:02:17.500 --> 00:02:19.800
 page will refresh with new information as it pulls it.

45
00:02:20.500 --> 00:02:22.400
So let's just start from the top down.

46
00:02:24.400 --> 00:02:27.500
The top line here is basically the

47
00:02:27.500 --> 00:02:30.500
 uptime. So how long this system has been running and here

48
00:02:30.500 --> 00:02:33.300
 it's been up for 18 minutes. This is because I we

49
00:02:33.300 --> 00:02:36.600
 did the reboot in the previous video this other column

50
00:02:36.600 --> 00:02:39.300
 here tells how many oh, I'm a users are logged in the system. And

51
00:02:39.300 --> 00:02:42.100
 here's your load average. So load averages split up

52
00:02:42.100 --> 00:02:45.800
 into three different sections. We have one minute five

53
00:02:45.800 --> 00:02:46.500
 minute 15.

54
00:02:47.600 --> 00:02:50.500
This tracks your load on your system over those three times

55
00:02:50.500 --> 00:02:50.900
 fans.

56
00:02:51.600 --> 00:02:54.900
Load average basically takes into account a

57
00:02:54.900 --> 00:02:57.600
 bunch of different data points of CPU memory

58
00:02:57.600 --> 00:03:00.500
 disk I/O Network IO and it

59
00:03:00.500 --> 00:03:03.600
 tries to give you a good indication of how busy

60
00:03:03.600 --> 00:03:06.300
 your system is now. It is not a

61
00:03:06.300 --> 00:03:09.400
 end all be all because you could have a very high

62
00:03:09.400 --> 00:03:10.700
 load on a system.

63
00:03:11.300 --> 00:03:14.600
And the system be performing fine and responses are

64
00:03:14.600 --> 00:03:17.300
 fine. So but what this is is a good indicator that

65
00:03:17.300 --> 00:03:20.500
 maybe you have stuff waiting for CPU time.

66
00:03:20.500 --> 00:03:23.100
 If you have a high load, so just use it

67
00:03:23.100 --> 00:03:24.100
 as a starting point.

68
00:03:25.200 --> 00:03:28.100
The next line down here is all about the tasks. So basically all the

69
00:03:28.100 --> 00:03:31.100
 tasks that are running whether they're what state they're in that

70
00:03:31.100 --> 00:03:32.600
 they stop they sleeping or running.

71
00:03:33.400 --> 00:03:37.400
This other line down here talks about the CPU basically

72
00:03:36.400 --> 00:03:39.400
 shows what percentage of the work is

73
00:03:39.400 --> 00:03:43.000
 being done in the user space. They're kernel or

74
00:03:42.900 --> 00:03:45.400
 if it's the cpu's idol

75
00:03:45.400 --> 00:03:48.600
 or it's waiting on I/O task to finish and then

76
00:03:48.600 --> 00:03:51.700
 these last two Fields down here all about

77
00:03:51.700 --> 00:03:54.500
 memory and swap. So memory you

78
00:03:54.500 --> 00:03:57.200
 got basically the total the free to use and then what do

79
00:03:57.200 --> 00:04:00.600
 you have in buffers in cash this last line here is Swap

80
00:04:00.600 --> 00:04:03.600
 and if you're unfamiliar with swap it is a way for your Lennox host

81
00:04:03.600 --> 00:04:06.800
 to write stuff out that

82
00:04:06.800 --> 00:04:09.400
 it usually would put in the physical memory on to disk

83
00:04:09.400 --> 00:04:13.000
 if there's a lot of back pressure or your system is busy obviously

84
00:04:12.900 --> 00:04:16.100
 swap writing writing

85
00:04:15.100 --> 00:04:18.400
 memory just to disc is a lot slower than

86
00:04:18.400 --> 00:04:21.300
 actually writing it to physical RAM. So just keep that

87
00:04:21.300 --> 00:04:24.600
 in mind. Okay, so everything down after this does top

88
00:04:24.600 --> 00:04:26.200
 levels is all about processes.

89
00:04:27.200 --> 00:04:30.300
And here we have a PID which is

90
00:04:30.300 --> 00:04:33.700
 the process ID. The user that that process

91
00:04:33.700 --> 00:04:36.200
 is running at don't worry about the pr and I

92
00:04:36.200 --> 00:04:39.200
 columns we're not going to discuss them. So you

93
00:04:39.200 --> 00:04:42.200
 have vert which is the virtual memory you have

94
00:04:42.200 --> 00:04:45.200
 res which is the resident memory or basically how much

95
00:04:45.200 --> 00:04:48.000
 memory that process is using of the physical of your

96
00:04:48.400 --> 00:04:48.800
 physical memory.

97
00:04:50.500 --> 00:04:53.500
Memory that is shared not only with your process but could

98
00:04:53.500 --> 00:04:56.700
 be shared with other processes and the virtual is

99
00:04:56.700 --> 00:04:58.000
 basically all those put together.

100
00:04:59.100 --> 00:05:02.400
Thing you also have here this s column

101
00:05:02.400 --> 00:05:05.700
 here is basically the state of your process whether

102
00:05:05.700 --> 00:05:08.700
 it's sleeping interrupted running that

103
00:05:08.700 --> 00:05:11.200
 sort of thing. You have percent CPU and percent

104
00:05:11.200 --> 00:05:14.800
 memory which basically shows how much percentage of

105
00:05:14.800 --> 00:05:17.300
 the process or how much percentage of the memory that you're

106
00:05:17.300 --> 00:05:20.400
 process is taking up or the this process taking up

107
00:05:20.400 --> 00:05:23.200
 and then the last column here is the command and so if

108
00:05:23.200 --> 00:05:26.200
 you watch it long enough, you see there's the top command we ran.

109
00:05:26.900 --> 00:05:29.900
The PID number one which is system D and is

110
00:05:29.900 --> 00:05:32.900
 this this will come back and forth as each of these processes

111
00:05:32.900 --> 00:05:35.100
 have their time with

112
00:05:35.100 --> 00:05:38.700
 the kernel and CPU to do work. Obviously. This

113
00:05:38.700 --> 00:05:41.100
 host is not doing anything. So as you can tell

114
00:05:41.100 --> 00:05:44.000
 there's no load. There's no CPU as you can come up here.

115
00:05:44.800 --> 00:05:47.400
Pretty much. Our CPU is almost a hundred percent. I

116
00:05:47.400 --> 00:05:50.100
 is a hundred percent of the time is Idle because we're not really

117
00:05:50.100 --> 00:05:53.300
 doing anything. So top is good for a quick overview of

118
00:05:53.300 --> 00:05:56.300
 a system at a glance. If a process

119
00:05:56.300 --> 00:05:59.200
 is using a lot of CPU or memory topkin show

120
00:05:59.200 --> 00:06:02.200
 that if your host has high load talking show that too

121
00:06:02.200 --> 00:06:05.500
 but I usually use top as a starting point if

122
00:06:05.500 --> 00:06:08.500
 I'm jumping on a system and I I think there's something wrong and I'm

123
00:06:08.500 --> 00:06:11.300
 starting to troubleshoot then I usually start

124
00:06:11.300 --> 00:06:11.700
 with top

125
00:06:12.700 --> 00:06:15.500
Okay to quit top you have to do control C

126
00:06:15.500 --> 00:06:18.900
 and that'll get you out of that polling page and

127
00:06:18.900 --> 00:06:21.400
 let's clear the screen. Okay. So the

128
00:06:21.400 --> 00:06:24.600
 next command is VM stat the vmstat command

129
00:06:24.600 --> 00:06:27.700
 reports info about processes memory block

130
00:06:27.700 --> 00:06:30.500
 IO and disk and CPU activity.

131
00:06:30.500 --> 00:06:34.000
 So vmstat command takes many flags,

132
00:06:33.300 --> 00:06:37.000
 but we're only going to focus on two arguments

133
00:06:36.100 --> 00:06:39.700
 that we're gonna pass to it the first argument tells VM

134
00:06:39.700 --> 00:06:39.900
 stat.

135
00:06:40.600 --> 00:06:43.400
How often to pull the system for the for this

136
00:06:43.400 --> 00:06:46.200
 data and then the second argument we're going to pass to it is

137
00:06:46.200 --> 00:06:49.900
 how many times should it do that? So in our case we are

138
00:06:49.900 --> 00:06:52.800
 going to just do one in five which means pull the

139
00:06:52.800 --> 00:06:55.400
 system every second but only do this for a

140
00:06:55.400 --> 00:06:56.700
 count of five times then quit.

141
00:06:57.500 --> 00:07:00.400
So go ahead and type VM stat space one space five

142
00:07:00.400 --> 00:07:04.100
 hit return and we'll let it run and as

143
00:07:03.100 --> 00:07:06.000
 you can see we did the five times.

144
00:07:07.200 --> 00:07:10.200
And so the output of vmset is broken up

145
00:07:10.200 --> 00:07:15.000
 into section. So the first section shows about processes like

146
00:07:14.200 --> 00:07:17.300
 kind of whether they're running a blocked. The second is

147
00:07:17.300 --> 00:07:20.400
 memory third to swap the fourth category.

148
00:07:20.400 --> 00:07:23.500
 There is I/O fifth is system and six to

149
00:07:23.500 --> 00:07:26.000
 CPU. So we'll go through a few

150
00:07:26.200 --> 00:07:29.000
 of these in just kind of talk briefly about what each of these do so

151
00:07:29.900 --> 00:07:32.600
If you have tasks waiting to run and are

152
00:07:32.600 --> 00:07:35.400
 blocked then the First Column would show that so R would

153
00:07:35.400 --> 00:07:38.300
 be they're running and B would be blocked. So if you had a high

154
00:07:38.300 --> 00:07:41.500
 number if you had a high number in the blocked, that

155
00:07:41.500 --> 00:07:44.700
 means you do have processes kind of waiting for something

156
00:07:44.700 --> 00:07:47.600
 so, that'd be a good indication of something. So if

157
00:07:47.600 --> 00:07:49.000
 you look at the memory category,

158
00:07:50.100 --> 00:07:54.300
You have swapped free buffer and cash columns swapped.

159
00:07:53.300 --> 00:07:56.100
 Basically this this column right

160
00:07:56.100 --> 00:07:59.100
 here basically just talks about what's what's being swapped in and out of

161
00:07:59.100 --> 00:07:59.400
 disk.

162
00:08:01.500 --> 00:08:04.600
How much is being swapped I should say from the

163
00:08:04.600 --> 00:08:07.400
 memory and then here you have the free

164
00:08:07.400 --> 00:08:10.900
 column and this shows you all the free unallocated

165
00:08:10.900 --> 00:08:11.800
 memory on your system.

166
00:08:12.500 --> 00:08:14.100
And then you have here the buffer.

167
00:08:15.800 --> 00:08:18.400
buff shows the actual amount of memory in

168
00:08:18.400 --> 00:08:18.900
 usage

169
00:08:20.100 --> 00:08:22.100
and you have here as the cash column.

170
00:08:23.100 --> 00:08:26.400
The cash column is used memory that could be either like

171
00:08:26.400 --> 00:08:29.400
 a cut the cash column shows memory

172
00:08:29.400 --> 00:08:32.400
 that's already used but it could be either swapped out

173
00:08:32.400 --> 00:08:35.500
 the disc or giving back to the system if if

174
00:08:35.500 --> 00:08:37.500
 they need it if there's any kind of memory pressure.

175
00:08:39.500 --> 00:08:42.400
This swap category where I talked about this is kind of just swapping in and

176
00:08:42.400 --> 00:08:43.900
 out and bytes which being the disc.

177
00:08:44.900 --> 00:08:47.300
IOS the same thing shows up

178
00:08:47.300 --> 00:08:50.400
 like activity for this like you have bites in bytes

179
00:08:50.400 --> 00:08:51.400
 out. So

180
00:08:52.800 --> 00:08:55.800
if you're experiencing slow disk rights might be

181
00:08:55.800 --> 00:08:59.100
 good idea to look in here. If you have a lot of high numbers

182
00:08:58.100 --> 00:09:01.100
 here that might be an indication of what is going on

183
00:09:01.100 --> 00:09:04.900
 and give you a breadcrumb to some other tool or

184
00:09:04.900 --> 00:09:05.500
 process to look at.

185
00:09:06.500 --> 00:09:09.800
System system is just kind of like how many tasks and

186
00:09:09.800 --> 00:09:12.200
 like how many things are being asked to do

187
00:09:12.200 --> 00:09:15.400
 you think of like contexts and so,

188
00:09:15.400 --> 00:09:18.700
 you know, this was really high then may indicate

189
00:09:18.700 --> 00:09:21.300
 that your system is over busy. And then the

190
00:09:21.300 --> 00:09:24.700
 last category is CPU. And so this shows you

191
00:09:24.700 --> 00:09:28.100
 information like user space your kernel

192
00:09:27.100 --> 00:09:30.600
 space What percentage they're running in it? How

193
00:09:30.600 --> 00:09:33.200
 idle is your CPU and then

194
00:09:33.200 --> 00:09:36.600
 you have weight right here wait, meaning that the

195
00:09:36.600 --> 00:09:40.100
 CPU is waiting to do work, but it's waiting on I/O task

196
00:09:39.100 --> 00:09:42.600
 to finish before we can if you ever have a high CPU

197
00:09:42.600 --> 00:09:45.200
 or a high load, but you can't figure out what a culprit is

198
00:09:45.200 --> 00:09:48.000
 go ahead and you should look at the weight column here because if you have

199
00:09:48.200 --> 00:09:51.700
 a slow disc or slow network connection that may be slowing backing

200
00:09:51.700 --> 00:09:53.900
 everything up and this would be a good indication of it.

201
00:09:54.700 --> 00:09:57.300
Okay. So what we'll do here is

202
00:09:57.300 --> 00:10:00.300
 we'll stop here. We've we've talked about the top of

203
00:10:00.300 --> 00:10:03.000
 the VMS document the next being that we're in the

204
00:10:03.200 --> 00:10:06.500
 cloud. We get a benefit of a whole bunch of metrics provided

205
00:10:06.500 --> 00:10:09.200
 to us out of the box. I wanted to start off with

206
00:10:09.200 --> 00:10:12.100
 showing you some Basics that are on a Linux

207
00:10:12.100 --> 00:10:15.600
 host. But now let's go. Look what AWS offers for our ec2

208
00:10:15.600 --> 00:10:17.200
 is and so let's head over to the browser.

209
00:10:18.200 --> 00:10:21.300
Okay. So here we are in the browser and the first place we're

210
00:10:21.300 --> 00:10:24.800
 gonna go look at is over our ec2 instance. There's

211
00:10:24.800 --> 00:10:27.200
 a monitoring tab if you recall from the

212
00:10:27.200 --> 00:10:30.200
 ec2 console here, so let's go here click on it.

213
00:10:32.100 --> 00:10:34.600
And as you can see what we'll go on the instances running.

214
00:10:35.700 --> 00:10:38.100
And if you recall this is our lab one.

215
00:10:39.200 --> 00:10:42.100
Go ahead and click the checkbox here. And this should

216
00:10:42.100 --> 00:10:45.400
 bring up our detailed view. I'll scroll this

217
00:10:45.400 --> 00:10:48.300
 up. So it's easy to see and go over here to the monitoring tab.

218
00:10:48.300 --> 00:10:51.700
 So click on monitoring and as you can see, let me

219
00:10:51.700 --> 00:10:54.200
 scroll up just a little bit easier to see we have a whole bunch of

220
00:10:54.200 --> 00:10:57.500
 small little graphs everything from CPU utilization

221
00:10:57.500 --> 00:11:00.400
 to the status checks and basically the status check

222
00:11:00.400 --> 00:11:03.100
 someone Amazon brings up an ec2 instance. It makes sure that

223
00:11:03.100 --> 00:11:06.900
 it's up and running and that these fail safes pass

224
00:11:06.900 --> 00:11:09.400
 before it'll allow you to say that hey there's a

225
00:11:09.400 --> 00:11:10.400
 problem with this host or not.

226
00:11:11.300 --> 00:11:14.400
So you have Network in bytes, you have the packets in

227
00:11:14.400 --> 00:11:18.100
 and out all the disc reads disc operations

228
00:11:17.100 --> 00:11:20.000
 did how many times we're writing to the

229
00:11:20.300 --> 00:11:24.100
 disc? And then you have this down here, which is called CPU credit

230
00:11:23.100 --> 00:11:26.200
 and CPU credit balance. So basically

231
00:11:26.200 --> 00:11:30.500
 what CPU credits are when you use a free tier and Amazon Linux CPU

232
00:11:29.500 --> 00:11:33.300
 credit allows you to do as

233
00:11:32.300 --> 00:11:35.700
 many tasks as you possibly can up until

234
00:11:35.700 --> 00:11:38.000
 certain point and when that happens you have

235
00:11:38.100 --> 00:11:41.800
 a balance in the more busy your free small

236
00:11:41.800 --> 00:11:44.400
 host becomes you start depleting your

237
00:11:44.400 --> 00:11:47.600
 balance of CPU credits. And if you hit zero after

238
00:11:47.600 --> 00:11:50.800
 a certain amount of time Amazon will actually throttle your

239
00:11:50.800 --> 00:11:53.400
 your free host to make it even slower.

240
00:11:53.400 --> 00:11:56.100
 So just be aware. That's why these are really good for

241
00:11:56.100 --> 00:11:59.300
 testing and for prototyping but you wouldn't want to run this free

242
00:11:59.300 --> 00:12:01.200
 tier this this T2 small.

243
00:12:02.800 --> 00:12:06.400
The micro here as a production host. Okay, so

244
00:12:05.400 --> 00:12:07.700
 let me scroll back up here.

245
00:12:08.400 --> 00:12:10.900
Another option you have here is you can look at like hey.

246
00:12:11.700 --> 00:12:14.500
What were the metrics for these hosts a

247
00:12:14.500 --> 00:12:17.800
 day ago and you can click over here to the one day into

248
00:12:17.800 --> 00:12:20.200
 three weeks we can do a custom time frame as you

249
00:12:20.200 --> 00:12:24.200
 can see right here. We had a spike right here on the CPU utilization. I

250
00:12:23.200 --> 00:12:26.400
 most certainly assume that is

251
00:12:26.400 --> 00:12:29.200
 when we rebooted the host, you know coming back up

252
00:12:29.200 --> 00:12:30.800
 we get a little Spike and

253
00:12:31.700 --> 00:12:34.500
The network or you know, that could also been when we

254
00:12:34.500 --> 00:12:37.700
 did the updated self and the young package

255
00:12:37.700 --> 00:12:39.200
 manager was using more CPU.

256
00:12:40.200 --> 00:12:43.200
So you can play around with that all you want and then you

257
00:12:43.200 --> 00:12:46.200
 come down here and you can also do you can do an auto

258
00:12:46.200 --> 00:12:49.500
 load where these this page refreshes every second. So this is great. If

259
00:12:49.500 --> 00:12:52.800
 you're already in this page, but Amazon provides a

260
00:12:52.800 --> 00:12:56.100
 whole product called cloudwatch metrics and

261
00:12:55.100 --> 00:12:58.800
 in my opinion, it's a much better experience in

262
00:12:58.800 --> 00:13:01.200
 this. This is good for a quick look but so what we can do

263
00:13:01.200 --> 00:13:04.200
 is we can click on the ad to dashboard here and what this

264
00:13:04.200 --> 00:13:07.500
 will do. This will bring us over to the cloud watch metrics and create a

265
00:13:07.500 --> 00:13:10.600
 dashboard for this specific instance for us. So I'm

266
00:13:10.600 --> 00:13:12.400
 gonna go ahead and click add to dashboard.

267
00:13:15.500 --> 00:13:18.800
Okay, so what it does here it says add it's popping

268
00:13:18.800 --> 00:13:21.700
 at us up asking a static dashboard since we've

269
00:13:21.700 --> 00:13:24.200
 never created. We don't have any dashboards. There's nothing to be found.

270
00:13:24.200 --> 00:13:27.800
 So we have to create a new one. So we create click create

271
00:13:27.800 --> 00:13:28.100
 new.

272
00:13:29.100 --> 00:13:32.900
And I am just gonna call this Linux lab, but

273
00:13:32.900 --> 00:13:35.100
 you could call whatever you want. You can't use

274
00:13:35.100 --> 00:13:38.300
 any spaces. So just be be aware and then click create.

275
00:13:39.200 --> 00:13:42.700
One now that's created it highlights us to a select dashboard force

276
00:13:42.700 --> 00:13:44.200
 and then you just click add to dashboard.

277
00:13:45.500 --> 00:13:48.700
If you go ahead and click save at the top here, this will

278
00:13:48.700 --> 00:13:51.000
 go ahead and save the dashboard. And as you can see

279
00:13:51.300 --> 00:13:54.800
 now we're under This Cloud watch metrics run

280
00:13:54.800 --> 00:13:57.200
 to Cloud watch. We're on the dashboards and that way the Linux

281
00:13:57.200 --> 00:14:00.300
 lab. So it's basically all those that we just

282
00:14:00.300 --> 00:14:03.200
 saw there except that we have a little bit

283
00:14:03.200 --> 00:14:06.500
 more a one central place to look at them. So we could you

284
00:14:06.500 --> 00:14:10.000
 could imagine putting a dashboard for all your ec2 instances

285
00:14:09.300 --> 00:14:12.400
 or you know for your database running

286
00:14:12.400 --> 00:14:14.100
 in AWS, whatever the case may be.

287
00:14:14.900 --> 00:14:17.400
Obviously here you can change the the resolution

288
00:14:17.400 --> 00:14:20.000
 as well. You know, we want to look back last 12 hours.

289
00:14:21.400 --> 00:14:24.500
You can do other things here too as well. You can you know,

290
00:14:24.500 --> 00:14:27.300
 share this dashboard. You can delete it. You can rename it those sort

291
00:14:27.300 --> 00:14:30.200
 of things. You can also click this little star little favorite which

292
00:14:30.200 --> 00:14:33.300
 will put it as one of your quick dashboards to look at if you

293
00:14:33.300 --> 00:14:36.400
 go over here to this little hamburger menu and if you click on

294
00:14:36.400 --> 00:14:36.700
 that

295
00:14:37.600 --> 00:14:40.300
What this will do is this will open up all the other

296
00:14:40.300 --> 00:14:43.000
 stuff that cloud watch offers. And if

297
00:14:43.300 --> 00:14:46.300
 you look there's alarms so you could go create an alarm based

298
00:14:46.300 --> 00:14:49.300
 on CPU utilization. You could see yourself saying hey

299
00:14:49.300 --> 00:14:53.100
 if the CPU gets above 80% page me or

300
00:14:52.100 --> 00:14:53.800
 send me an email.

301
00:14:54.600 --> 00:14:57.400
This is obviously logs. So you could go create a

302
00:14:57.400 --> 00:15:00.200
 law group and pull in all the logs from all your

303
00:15:00.200 --> 00:15:03.200
 ec2 instances and you could write an alarm

304
00:15:03.200 --> 00:15:06.400
 an alert on a log base if you see something in

305
00:15:06.400 --> 00:15:09.000
 a lot a log line you could send an alert.

306
00:15:10.300 --> 00:15:13.400
You also have metrics and so you you have

307
00:15:13.400 --> 00:15:16.400
 a metrics all metrics and metrics explore. And what

308
00:15:16.400 --> 00:15:19.500
 you could do is you could go look at all the metrics for all your accounts

309
00:15:19.500 --> 00:15:22.900
 and that you have access to this is

310
00:15:22.900 --> 00:15:25.400
 also an easy way to do it here as a quick way. If you go back over

311
00:15:25.400 --> 00:15:29.000
 here, let's go to CP utilization and you click on the three dots you

312
00:15:28.100 --> 00:15:31.100
 can see this link. Dennis's view this

313
00:15:31.100 --> 00:15:35.400
 symmetrics and what this will do is this will bring this exact metric

314
00:15:34.400 --> 00:15:37.500
 up in the metric Explorer and I'll

315
00:15:37.500 --> 00:15:38.800
 click on this now so you can see it.

316
00:15:39.400 --> 00:15:42.700
And so as you can see, we're in metrics basically all

317
00:15:42.700 --> 00:15:45.300
 the metrics. You have the graph up top. You have

318
00:15:45.300 --> 00:15:48.900
 the graphed and see how it already highlighted our ec2 instance

319
00:15:48.900 --> 00:15:51.300
 for us and it tells us let me move

320
00:15:51.300 --> 00:15:54.700
 this over it tells us what the metric is. It's CPU

321
00:15:54.700 --> 00:15:57.200
 utilization. The statistic is

322
00:15:57.200 --> 00:16:00.500
 doing an average and it's looking over a five minute period

323
00:16:00.500 --> 00:16:03.000
 And so you can adjust these as you go

324
00:16:03.000 --> 00:16:03.100
 to.

325
00:16:04.100 --> 00:16:07.400
but I wanted you to have a basic idea of

326
00:16:08.300 --> 00:16:11.600
What also you could provide that AWS provides

327
00:16:11.600 --> 00:16:14.400
 for ec2 instances, there is a lot more you can do here

328
00:16:14.400 --> 00:16:17.400
 in like anomaly detection and insights and

329
00:16:17.400 --> 00:16:20.800
 alerting. It's really is a One-Stop shop for you. So while

330
00:16:20.800 --> 00:16:23.300
 it is great to know how to do things on the command line.

331
00:16:24.500 --> 00:16:26.900
On Linux to be able to troubleshoot a host.

332
00:16:27.700 --> 00:16:30.900
It is great that because you're in a cloud environment

333
00:16:30.900 --> 00:16:33.800
 that you have access to all these other tools basically out

334
00:16:33.800 --> 00:16:36.300
 of the box for you that you can turn on and

335
00:16:36.300 --> 00:16:38.500
 start using once you spin up an instance.

336
00:16:39.300 --> 00:16:43.200
Okay, so that'll cover our AWS dashboard.

337
00:16:44.400 --> 00:16:47.100
Let's head back over and let's do a recap of everything we

338
00:16:47.100 --> 00:16:47.700
 did in this video.

339
00:16:48.600 --> 00:16:51.900
Okay, so let's talk about what we did in this video. You learned

340
00:16:51.900 --> 00:16:54.400
 about basic monitoring from the command line on

341
00:16:54.400 --> 00:16:57.200
 a Linux host you use the top in VM

342
00:16:57.200 --> 00:17:00.100
 stack commands to validate the health of your Linux instance.

343
00:17:01.300 --> 00:17:04.200
Finally you visited the AWS console and looked at

344
00:17:04.200 --> 00:17:07.500
 cloudwatch metrics and created a simple dashboard for monitoring

345
00:17:07.500 --> 00:17:08.600
 your ec2 instance.

346
00:17:10.200 --> 00:17:13.400
In the next video, you'll explore networking inside your

347
00:17:13.400 --> 00:17:14.000
 Lennox host.
