Learn how to create a custom metric for CloudWatch logs, configure an alarm on that metric, and generate error traffic to trigger the alarm.
- [Narrator] Now that we have application logs…being ingested into CloudWatch,…we can create a custom metric based on those logs.…While the occasional "404 Page Not Found" error…is likely to happen, having many 404's in quick succession…could indicate a link rot problem.…As such, I want to create an alert whenever twenty…or more 404's are found within a single minute.…The number twenty is somewhat arbitrary.…You'll have to consider the context of each application…when determining the right number for you.…
First, I'll configure a custom metric.…Then, I'll configure a CloudWatch alert…based on that metric.…Finally, I'll generate an application error condition…to trigger that alert.…With the WordPress access log being ingested by CloudWatch,…I'm now going to create a custom CloudWatch metric.…Using the breadcrumbs at the top of the screen,…I click back to Log Groups.…I select the access log, Log Group,…then click the blue Create Metric Filter button.…
In the filter pattern, I type "404."…Unfortunately, filter patterns…
This course is also part of a series designed to help you prepare for the AWS Certified SysOps Administrator – Associate certification exam.
This course includes trademarks owned by Amazon Web Services. This course has not been prepared, approved, or endorsed by Amazon Web Services.
- Exploring monitoring tools
- Understanding CloudWatch
- Using CloudWatch alarms
- Monitoring EC2 memory
- Using AWS Config
- Understanding AWS logging and ElasticSearch
- Combining CloudWatch and Lambda