A cloudwatch metric

  • Is a group of data points which are arranged as per time and sent to CloudWatch.
  • To illustrate, consider it as a variable whose value changes over time and has to be monitored.
  • Data points are generated by all AWS services
  • AWS services send metrics to CloudWatch
  • Can send custom metrics to CloudWatch also
  • Can add data points in any order or at any rate
  • Retrieve statistics about data points as an ordered set of time-series data.
  • Metrics are specific to a Region in which were created
  • Metrics cannot be deleted,
  • By default all data point expire automatically, after 15 months if no new data is added.
  • They expire on a rolling basis; as new data points come in, data older than 15 months is dropped.
  • Metrics are defined uniquely by, specific
    • name
    • namespace
    • zero or more dimensions.
  • Each data point in a metric has a time stamp, and (optionally) a unit of measure.

CloudWatch Metrics Time Stamps

  • Each metric data point must be associated with a time stamp.
  • The range of time stamp value can be of past two weeks or future two hours
  • If no time stamp is given, CloudWatch creates a time stamp on time data point was received.
  • Time stamps are dateTime objects
  • Coordinated Universal Time (UTC) is recommended
  • Time values are specified in UTC, in CloudWatch
  • Metrics are checked by CloudWatch alarms with current time specified in UTC.

CloudWatch Metrics Retention

CloudWatch retains metric data as follows:

  • For a period <60 seconds, available for 3 hours. Also called as high-resolution custom metrics.
  • For a period of 60 seconds/1 minute, available for 15 days
  • For a period of 300 seconds/5 minute, available for 63 days
  • For a period of 3600 seconds/1 hour, available for 455 days (15 months)

CloudWatch Metrics Units

  • Each statistic has a unit of measure.
  • Few example metric units are
    • Bytes
    • Seconds
    • Count
    • Percent.
  • custom metric  creation needs unit to be specified
  • If not specified, CloudWatch uses None as the unit.
  • No significance is given to a unit by CloudWatch internally
  • unit of measure are aggregated separately  Metric data points that specify a unit of measure are aggregated separately.
  • Statistics without specifying a unit, CloudWatch aggregates all data points of the same unit together.

CloudWatch Metrics Periods

  • Period refers to duration of time linked with a specific CloudWatch statistic.
  • Periods defined in seconds, and valid values for period are 1, 5, 10, 30, or any multiple of 60.
  • For period of six minutes, use 360 as the period value.
  • varying period values, can help in see changes in data aggregation
  • sub-minute periods are supported for those custom metrics having storage resolution of 1 second
  • Retrieval of statistics needs
    • Period
    • start time
    • end time
  • The default values for the start time and end time get you the last hour’s worth of statistics.
  • For statistics aggregated over the entire hour, specify a period of 3600.
  • aggregated statistics are stamped with the time corresponding to the beginning of the period.
  • Periods are also important for CloudWatch alarms.

CloudWatch Metrics Aggregation

  • CloudWatch aggregates statistics as per specified period length
  • publish as many data points as needed with same or similar time stamps.
  • CloudWatch aggregates them as per specified period length.
  • CloudWatch does not aggregate data across Regions.
  • pre-aggregated dataset (statistic set ) should be added in case of large datasets
  • With statistic sets, gives Min, Max, Sum, and SampleCount for a number of data points.
  • No differentiation is done by CloudWatch on basis of source of metric.
  • metric with namespace and dimensions is treated as single metric, even if having different sources

CloudWatch Percentiles

  • A percentile indicates the relative standing of a value in a dataset.
  • example, the 95th percentile means that 95 percent of the data is lower than this value and 5 percent of the data is higher than this value.
  • Used to isolate anomalies.
Menu