Placeholder Image

字幕列表 影片播放

  • l a word.

  • I want to go to the very basics.

  • I want to talk about logging on monitoring, using cloudwatch.

  • So I want to start from the very start asking the question.

  • What is Cloudwatch Garage is the monitoring service from a dolorous.

  • It helps you to keep your logs truck.

  • Some metrics trigger some alarms.

  • It can also record all the different changes in your infrastructure so you can do things with it.

  • Like too glum.

  • Gus, if you have too many instances running or things like that, it does all kind of very interesting things.

  • So it's more than just along in tow.

  • So Carol help you to bring the visibility from your infrastructure into one place that I think that's one of the biggest challenges in eight years.

  • To see what is going on in all these different service is on cloud is that place where you can connect everything together.

  • We have been using cloud.

  • What's to check the logs from land?

  • Us.

  • But he can also do other things we need, like check different metrics in your dynamo or even check the logs from the A P.

  • I gave away a few naval resources will push some kind of information to cloud words, but specifically for London Club.

  • Which is a great thing, because when you have these execution times that is very limited on a femoral and you want to respond this first, it's possible you want that you're logging is not consuming thing kind off your execution time on when you're working with London Cloudwatch London will be kind of streaming us incredulously.

  • The logs to cloudwatch on its doesn't consume any extra execution time in your function on it doesn't generate any performance.

  • Issue us with other libraries.

  • External libraries from AWS did may generate some problems.

  • So that's why I usually is a good practice to use your cloudwatch flogging in Lambda and then maybe you some external library to see these logs or filter this locks or something like that.

  • But but keep the cloudwatch asked the logging place for your lumber.

  • So now I want to show you basics of cloudwatch.

  • Let's go to try out the metrics, the logging on the dashboard on Let's go to the council to get that done.

  • Let's start by creating a new empty pressure.

  • This is going to be very, very very simple projects.

  • Hope.

  • Just follow the steps.

  • Us always to create a simple project with Errol.

  • Louis.

  • No, J es us the template.

  • We're going to get into atom on, do some small modifications.

  • The court is available and get help.

  • But this is very simple code.

  • So I just remove all this comments to make it simpler to read on.

  • Then I will create a trigger for the hello function so we can trigger these easily.

  • What we're going to do here, after we create a trigger, is to do a council log because that's what we want to try.

  • I was just changed the message to something this consul log will choose, right?

  • Hello In the console was called so very simple message.

  • So we will deploy now and we'll see what happens to our speed up The deployment on when we finished deployment I wish has triggered these function with that world must have strayed from both won so on we can see the message.

  • So now we can go to Lambda in our account in $8 in the console on Nan.

  • If ical there and you look for the function that issues deployed, McCloud watch them.

  • Hello.

  • You can go to monitoring on there.

  • You can see the different metrics for these function when to see the logs.

  • You can't just go to looks.

  • This is one way to find logs on there.

  • You can see the logs for this call because he, hello was called on our way is a little bit more straightforward, but in a way, not that easy.

  • Sometimes to find us to go directly to call out, watch and then go to low and there look for the logs in the least off London's.

  • If you have few London's, then it becomes very easy.

  • If you have a lot like me, these becomes very painful.

  • So when you find your your loving them and you can get into the law group on, then you can see exactly the same on our way to do that, to see the logs.

  • My favorite, I will say, is to see the logs from the several is framework in your terminal so you just type it.

  • Celeste looks minus f the name off the function on my new Steve to tell the log, So these, if you keep on calling it, will keep on appearing If you don't put the minus T, it was just print.

  • Whatever.

  • Is there nothing you can do with Claude watches?

  • I said It's too great Dashboards with metrics.

  • So which has created a new dashboard.

  • I'll put the nine testing.

  • Glad watch.

  • You can put any name you want, and there you have an empty dash Word on there you can add witch.

  • It's this touch worse you can display in a screen, or you can have them open to see how your service is performing on.

  • When you add a new metric, you can look for the different service is we'll just look for lambda and then you can look by function name and there is all functions there.

  • Then I was just look for the cruelest cloudwatch and you can search So it becomes is here.

  • But the name of the function.

  • It just shows that it filters out the rest.

  • And then if you see on the ride, you start seeing some dots appearing.

  • Those are like the only time we invoke dysfunction, so there's only one.

  • But if this is called many times, then you will see lines so you can define things like the order in which these metrics are shown.

  • You can also find the period that this metrics are showing so either one second off information or five minutes or one hour on depending on that, you're going to see different things.

  • The period and the statistics will make you see different things so is important than you.

  • Tune your dashboard to something that you understand.

  • So for about 30 seconds, the average it would be the ricin.

  • 30 seconds.

  • But I want to some in 30 seconds.

  • So it's a different value on the average.

  • This case is the same because I only call it once.

  • But if you have multiple for some metrics, the average is good for others, to some is better.

  • And then you have some graph options.

  • You can put connotations.

  • You can.

  • The fine was kind off data you how you want to show the data, Andi, That's kind off the graph.

  • Then you can add numbers.

  • Those graphs.

  • That's something I like.

  • Some things are easy to see US number.

  • So just look again for the for the same function, and then you can see even change the period than the average just disappears.

  • There's not enough data.

  • Now we have it one minute and we don't have any data there.

  • So in order to get some day that what I will do is trigger dysfunction many times so we can see in one minute.

  • I don't know how many implications would have.

  • This takes a while.

  • Usually Claude watches almost real time, so you need sometimes to wait a little bit.

  • Now, if I refresh this graph, you can see that there is some values on.

  • We can see that there is some indication, and also you can see now that we have called this a couple of times.

  • So if I change the period and I changed the statistic, you start seeing things differently.

  • So you have around off, you know, invocations.

  • In one minute, there were four in one hour.

  • There's eight, so it's different, different values, so you can play a little bit with that.

  • But always be careful on what is your period on?

  • What is your metric that sometimes those numbers can be deceiving if you don't know what you're putting there, so nothing you can do is you can change the period that you're showing the data.

  • So even if the metric is being display for over 30 seconds, it goes to show what has happened in the last hour.

  • In the last three hours.

  • In the last they are.

  • Then you can show what happened in the last minute.

  • One of the last 15 minutes.

  • One thinks of that.

  • Remember that you need some data.

  • This was a video for today.

  • I hope you like it if you didn't give a big thumbs up.

l a word.

字幕與單字

影片操作 你可以在這邊進行「影片」的調整,以及「字幕」的顯示

B1 中級

Amazon CloudWatch。無服務器日誌記錄和監控基礎知識 (Amazon CloudWatch: Serverless Logging and Monitoring Basics)

  • 0 0
    林宜悉 發佈於 2021 年 01 月 14 日
影片單字