Join Joseph Holbrook for an in-depth discussion in this video AWS CloudWatch, part of Amazon Web Services: Analysis.
- [Instructor] I am now over in the AWS management console. For this exercise, we will go ahead and proceed and set up an alarm to notify us of an RDS monitoring concern that we have. Let's proceed and validate our RDS instances that we want to monitor. Let's select RDS. RDS is Amazon Web Services' relational database service. We're currently using resources in the Northern Virginia region.
Let's proceed over and select DB instances. We have two instances that are running MySQL. We can confirm that they're both available and we can confirm that the CPU utilization is under 30%. We can also confirm that we have a master and a replica. Let's go ahead and confirm the master by selecting the master. When we select the master, we get a menu that shows us alarms and recent events, and you can see the activity of the events that have occurred.
For this specific exam, I'd like to highlight the monitoring capabilities. You want to make sure that you understand the capabilities of the RDS dashboard that we're currently in. You could monitor CPU memory and storage. As you could see, you can also monitor IOPS as well as swap usage. Let's proceed over and validate our configuration under CloudWatch.
Let's go back to the dashboard and select CloudWatch. We are now under CloudWatch, and what we'd like to do now is proceed in validating the alarms that I have set up. As you can see, I have two alarms that are showing red and two that show green. For this exercise, to help display the power of CloudWatch, let's go ahead and select the RDS instances that we just viewed.
I have a CPU utilization alarm configured. Let's go ahead and select that. It selects the AWS RDS CPU utilization alarm. What we want to do is move up the dashboard console so that we could view it a little easier. Under the alarm that we select, we could see the description. We can see the threshold. For this exercise here, what we'd like to do is change the utilization setting from 50 to 10.
This will set off an alarm that will go off after the utilization exceeds 10% or is equal to 10% CPU utilization. What we want to do now is go up to Actions. We will then select Modify. As you can see, we have the Modify Alarm web page here. What we want to do is select under Whenever and is, as you see is, you have the greater than or equal to sign.
We want to change the 50 to a 10. This will allow us to be notified when the threshold exceeds 10%. The setting that says for consecutive periods is currently one. We will go ahead and leave it for this exercise. What that means is when the period that's selected over to the right exceeds a number of periods that currently occur, it will send an alarm.
In this case, we want to be notified after the first period or the first occurrence of this alarm. Let's go ahead and save changes. The alarm has been set up and is changed from a utilization of 50 to 10. We will now need to wait approximately one minute for this to occur, and then we will proceed back and refresh the page, and we will validate that the alarm has changed from green to red.
As you could see, it just refreshed, and it may take another 10 or 15 seconds to update. We will now to go over to refresh and refresh that instance. The alarm has changed from green to red, and therefore validating that CloudWatch has picked up and has essentially identified that we've exceeded that specific CPU utilization threshold. AWS CloudWatch.
Let's go ahead and talk about CloudWatch. CloudWatch is a monitoring service that runs on AWS and can monitor your AWS resources as well as your applications. AWS collects and tracks metrics. It can collect and monitor log files. You can also set up log files to be delivered via SMS or email or however you so choose. You can set alarms as well as have it react to changes in your AWS resources.
This is known as event-driven management. You can also use the free tier and the paid tiers. With CloudWatch, most resources, such as EC2, S3, DynamoDB, EBS, RDS, Elastic MapReduce, Elastic Load Balancer, and many other resources in AWS have metrics that you could set up with CloudWatch to monitor those resources.
For example, here is a CloudWatch workflow. CloudWatch uses events, and you can set these events to kick off over a set period of time and over specific conditions. With SNS, you can publish that event to DynamoDB, for example, as a topic, and you could also kick off Lambda functions, as well. Remember Lambda is the serverless compute capability of Amazon Web Services.
Here's a test tip. High-resolution alarms are only available with the paid tier.
- AWS performance bottlenecks
- Monitoring EC2 instances with CloudWatch
- Monitoring EBS storage bottlenecks
- Monitoring RT53
- Optimizing the environment
- Optimizing RDS database services
- Consolidated billing best practices
- Identifying application issues
- Customizing CloudWatch metrics and dashboards
- CloudFront edge caching