CloudWatch

CloudWatch is a monitoring service for AWS resources and applications running on AWS. You can collect and monitor metrics and log files of various AWS services and set alarms. When you start the corresponding AWS service, data points are regularly sent to CloudWatch, so you can view and analyze the metrics on a graphical screen without being particularly aware. With custom metrics, you can use graphical graphs for metrics collected from your own application. Using the alarm function, not only notification using SNS, addition of EC2 instance by Auto Scaling, or recovery of EC2 instance is also possible.

Data points, metrics
When you start a supported AWS service, data points (monitoring data) are sent to CloudWatch stores data points in metrics.
Metrics can be thought of as monitored variables, and data points can be thought of as the values of variables over time. Data points are not necessarily related to AWS services. It may be the data sent by the script created by the user. In other words, the metric may be the CPU utilization of an EC2 instance, or it may be the response speed of the application or room temperature.
Metrics are identified by name, namespace, and one or more dimensions. Metrics are stored for two weeks.

Name space
Namespaces store metrics. The metric name [CPUUtilization] is used in EC2 and RDS. The namespace [AWS/EC2] or [AWS/RDS] is used as one element to identify metrics.

Dimension
Dimensions are categories of metrics. Statistical monitoring is possible using dimensions. Use the dimension [InstanceId] to check the metrics of an instance. You can use the dimension [AutoScalingGroupName] to monitor data for each autoscaling group.

EC2 Metrics Dimension

AutoScalingGroupName
ImageId
InstanceId
InstanceType

では早速触っていきましょう。