Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore UNIT 14

UNIT 14

Published by Teamlease Edtech Ltd (Amita Chitroda), 2022-03-28 10:49:27

Description: UNIT 14

Search

Read the Text Version

AWS Fundamentals: Amazon CloudWatch UNIT 14: AMAZON CLOUDWATCH Structure 14.1 Learning Objectives 14.2 Overview 14.3 How Amazon CloudWatch works 14.4 Create CloudWatch Alarms to Monitor the EC2 Instances & EBS 14.5 Create CloudWatch Alarms to Monitor the Elastic Load Balancer 14.6 Create CloudWatch Alarms to Monitor the Relational Database Service 14.7 Summary 14.8 Glossary 14.9 References 14.1 Learning Objectives After studying this unit, you will be able to: • Give an overview on CloudWatch • Describe on Amazon CloudWatch works • Explain on how we can Create CloudWatch Alarms to Monitor the EC2 Instances & EBS • Explain on how we can Create CloudWatch Alarms to Monitor the Elastic Load Balancer • Explain on how we can Create CloudWatch Alarms to Monitor the Relational Database Service 14.2 Overview Amazon CloudWatch is basically a metrics repository. An AWS service such as Amazon EC2 puts metrics into the repository, and you retrieve statistics based on those metrics. If you put your own custom metrics into the repository, you can retrieve statistics on these metrics as well. Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and the applications you run on AWS in real time. You can use CloudWatch to collect and track metrics, which are variables you can measure for your resources and applications. The CloudWatch home page automatically displays metrics about every AWS service you use. You can additionally create custom dashboards to display metrics about your custom applications, and display custom collections of metrics that you choose. For example, you can monitor the CPU usage and disk reads and writes of your Amazon EC2 instances and then use that data to determine whether you should launch additional instances to handle increased load. Page 1 of 5 All Rights Reserved. Vol. TLE001/03-2022

AWS Fundamentals: Amazon CloudWatch 14.3 HOW AMAZON CLOUDWATCH WORKS? 1. You can use metrics to calculate statistics and then present the data graphically in the CloudWatch console. 2. You can configure alarm actions to stop, start, or terminate an Amazon EC2 instance when certain criteria are met. 3. In addition, you can create alarms that initiate Amazon EC2 Auto Scaling and Amazon Simple Notification Service (Amazon SNS) actions on your behalf. 4. AWS Cloud computing resources are housed in highly available data center facilities. To provide additional scalability and reliability, each data center facility is located in a specific geographical area, known as a Region. Each Region is designed to be completely isolated from the other Regions, to achieve the greatest possible failure isolation and stability. Metrics are stored separately in Regions, but you can use CloudWatch cross- Region functionality to aggregate statistics from different Regions. 5. CloudWatch collects monitoring and operational data in the form of logs, metrics, and events, and visualizes it using automated dashboards so you can get a unified view of your AWS resources, applications, and services that run on AWS and on premises. 14.4 CREATE ALARMS TO MONITOR THE EC2 INSTANCES & EBS We can create a CloudWatch alarm that monitors CloudWatch metrics for one of your instances. To create an alarm using the Amazon EC2 console 1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/. Page 2 of 5 All Rights Reserved. Vol. TLE001/03-2022

AWS Fundamentals: Amazon CloudWatch 2. In the navigation pane, choose Instances. 3. Select the instance and choose Actions, Monitor and troubleshoot Manage CloudWatch alarms. 4. On the Manage CloudWatch alarms detail page, under Add or edit alarm, select Create an alarm. 5. For Alarm notification, choose whether to turn the toggle on or off to configure Amazon Simple Notification Service (Amazon SNS) notifications. Enter an existing Amazon SNS topic or enter a name to create a new topic. 6. For Alarm action, choose whether to turn the toggle on or off to specify an action to take when the alarm is triggered. Select an action from the dropdown. 7. For Alarm thresholds, select the metric and criteria for the alarm. For example, you can leave the default settings for Group samples by (Average) and Type of data to sample (CPU utilization). For Alarm when, choose >= and enter 0.80. For Consecutive period, enter 1. For Period, select 5 minutes. 8. (Optional) For Sample metric data, choose Add to dashboard. 9. Choose Create. We can edit your CloudWatch alarm settings from the Amazon EC2 console or the CloudWatch console. If you want to delete your alarm, you can do so from the CloudWatch console. 14.5 CREATE ALARMS TO MONITOR THE ELASTIC LOAD BALANCER CloudWatch metrics for Elastic Load Balancing can be viewed normally through the Metrics portion of CloudWatch, but it is also possible to use the Monitoring tab in the Load Balancer section of the EC2 console. This tab shows several metric graphs for each ELB. CloudWatch alarms are created from the CloudWatch console. Let’s talk about how to create CloudWatch alarms on those metrics. CloudWatch alarms are created from the CloudWatch console. 1. Click on Create Alarm. 2. Click on Select Metric and type the name of the metric into the search box. 3. Choose the metric for the instance you’re going to monitor (under EC2 > Per-Instance Metrics) and look at a 1 week graph to determine what your baselines are. Click Select Metric. Page 3 of 5 All Rights Reserved. Vol. TLE001/03-2022

AWS Fundamentals: Amazon CloudWatch 4. Name and describe your alarm. 5. Configure your thresholds. You can use the thresholds described earlier in this article for each metric. 6. Choose what to do when data is missing 7. Set up notifications for the alarm. 8. Click Create Alarm. Since CloudWatch only supports creating an alarm on a single metric, you’ll have to repeat the whole process for each instance and metric combination. 14.6 CREATE ALARMS TO MONITOR THE RELATIONAL DATABASE SERVICE Amazon RDS allows you to store your application data in databases without having to actually manage the servers the databases are hosted on. RDS publishes a host of metrics to CloudWatch and looking for abnormalities and limits in these metrics are a great way to spot issues with your databases. Let’s talk about how to create CloudWatch alarms on those metrics. CloudWatch alarms are created from the CloudWatch console. 1. Click on Create Alarm. 2. Click on Select Metric and type the name of the metric into the search box. 3. Choose the metric for the database you’re going to monitor (which you can find in the tile labeled Per-Database Metrics) and look at a 1 week graph to determine what your baselines are. Click Select Metric. 4. Name and describe your alarm. 14.7 Summary • Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and the applications you run on AWS in real time • We can create a CloudWatch alarm that monitors CloudWatch metrics for one of your instances • CloudWatch metrics for Elastic Load Balancing can be viewed normally through the Metrics portion of CloudWatch • The CloudWatch home page automatically displays metrics about every AWS service • Amazon RDS allows you to store your application data in databases without having to actually manage the servers the databases 14.8 GLOSSARY • Dynamic: characterized by constant change, activity, or progress. • Architecture: the art or practice of designing and constructing buildings. • Edge: the outside limit of an object, area, or surface • Cache: a collection of items of the same type stored in a hidden place. Page 4 of 5 All Rights Reserved. Vol. TLE001/03-2022

AWS Fundamentals: Amazon CloudWatch 14.9 Reference • Amazon Referral Link: https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html • Wikipedia Referral Link: https://en.wikipedia.org/wiki/Amazon_S3 Back to top Page 5 of 5 All Rights Reserved. Vol. TLE001/03-2022


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook