2 minute read

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

CloudFront

Requests

The total number of viewer requests received by CloudFront, for all HTTP methods and for both HTTP and HTTPS requests.

  • Statistic: Sum
  • Unit: None

4xx error rate

The percentage of all viewer requests for which the response’s HTTP status code is 4xx.

  • Statistic: Average
  • Unit: Percent

Common Status Codes

  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden / Permission Issue
  • 404 Not Found
  • 429 Too Many Requests

Example: In one hour, there is:

Total Requests = 100,000
404 Errors = 1,000
403 Errors = 500

4xx Errors = 1,500
4xx Error Rate = (1,500 / 100,000) * 100% = 1.5%

Interpretation

Value Meaning
< 1% Normal
1% - 5% Investigate
> 5% Potential issue

5xx error rate

The percentage of all viewer requests for which the response’s HTTP status code is 5xx.

  • Statistic: Average
  • Unit: Percent

Common Status Codes

  • 500 Internal Server Error
  • 502 Bad Gateway
  • 503 Service Unavailable
  • 504 Gateway Timeout

Interpretation

Value Meaning
0% Ideal
< 0.1% Usually acceptable
> 1% Investigate immediately
> 5% Major outage likely

Bytes downloaded

The total number of bytes downloaded by viewers for GET and HEAD requests.

  • Statistic: Sum
  • Unit: None

Bytes uploaded

The total number of bytes that viewers uploaded to CloudFront, using OPTIONS, POST and PUT requests.

  • Statistic: Sum
  • Unit: None

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.