Monitoring Metrics AWS
it’s just for monitoring.
1. Amazon Web Services
Amazon EC2
CPUUtilization
The percentage of allocated EC2 compute units currently in use. This metric indicates how heavily the instance CPU is being utilized.
- Unit: Percent (%)
- Statistic: Average, Maximum
Example
- Average CPU utilization remains above 80% for 15 minutes, indicating the instance may be undersized.
- CPU utilization remains below 10% for several days, suggesting potential overprovisioning.
StatusCheckFailed
Reports whether the instance has passed all status checks in the last minute.
This metric can be either 0 (passed) or 1 (failed).
- Unit: Count
- Statistic: Maximum
Status
Monitoring Explanation
If we configure:
- Metric: CPUUtilization
- Time range: Last 7 days
- Statistic: Average
- Period: 1 hour
it means: For each 1-hour interval during the last 7 days, CloudWatch calculates the average CPU utilization of all data points collected within that hour.
Suppose between 09:00 and 10:00 CloudWatch collected these CPU values:
| Time | CPUUtilization |
|---|---|
| 09:00 | 20% |
| 09:05 | 30% |
| 09:10 | 40% |
| 09:15 | 50% |
| … | … |
The average for that 1-hour period might be:
(20 + 30 + 40 + 50 + ...) / number of samples
= 35%
For a 7-day range, we will get: 7 days × 24 hours = 168 data points.