Metrics

Metrics are often used to monitor things that can be quantified, such as system metrics (CPU utilization, free memory, network consumption), page views, or HTTP status (the current error rate in my application).

In CloudWatch, metrics are defined as tuples and contain the following:

  • The resource ID
  • The service name
  • The metric name
  • A metric value
  • A timestamp

For example: a metric of i-e434d47f | EC2 | CPUUtilization | 13.4 | 2017-08-14T12:00:00.000Z shows that the CPU utilization of the EC2 instance ID i-e434d47f was at 13.4% on 2017-08-14T12:00:00.000Z.

Most AWS will integrate natively with CloudWatch. By going to https://console.aws.amazon.com/cloudwatch, you can start browsing the different metrics already generated by the different services we used, using the metrics menu on the left-hand side or the Browse Metrics button on the Metrics Summary page.

We can display, for example, a metric representing how much data we have in our S3 bucket as follows:

  1. From the CloudWatch dashboard, click on Browse Metrics.
  2. Select the S3 service from the Namespaces section.
  3. Select Storage Metrics.
  4. Find the bucket used to store artifacts and pick the metric BucketSizeBytes:
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset