CloudWatch is an AWS service that collects operational data and logs, which is useful for setting actions or alarms based on the collected data, and funneling the data to somewhere else.

Functionalities

  • Metrics: time-ordered data points relating to AWS products, apps (e.g. storage user, number of visitors), or on-prem
    • can be used for anything AWS
    • require AWS CloudWatch agents for things outside of AWS (e.g. on-prem) or for specific things (e.g. monitor processes on EC2 instances)
  • Logs: AWS products, app, on-prem
  • Events: AWS services and schedules
    • e.g. EC2 stopped
    • can set up event triggers (e.g. billing alarm, auto-scaling EC2, SNS) or timed actions
  • Namespace: container for data; separate the service instances that log into the same metric
    • Note: all AWS data by default goes under AWS/<service-name>; no namespaces may be created under AWS/
    • Dimensions are useful for providing perspective on metric data, e.g., filter for datapoints for particular instance
    • Some services have an option for detailed monitoring, which typically sends data points more frequently (and also costs more)
  • Alarm: linked to a metric, if a criteria is satisfied, then an action is taken (e.g. raise an alarm, notify via SNS, etc)
    • An alarm’s possible states: OK, Alarm, Insufficient data