AWS Cloudwatch

CloudWatch collects monitoring and operational data in the form of logs, metrics, and events, and visualizes it using automated dashboards so you can get a unified view of your AWS resources, applications, and services that run in AWS and on-premises.

Cloudwatch Metrics
  1. Metric: A metric represents a time-ordered set of data points that are published to CloudWatch
  2. Datapoint:
    1. Definition: Variable to monitor: E.g. CPU Usage of a EC2 instance
    2. Data points: The value of the variable at a specific point in time. Each metric data point must be associated with a timestamp
  3. Namespace: A namespace is a container for CloudWatch metrics. Metrics in different namespaces are isolated from each other, so that metrics from different applications are not mistakenly aggregated into the same statistics.
  4. Dimension : Dimensions are preset groupings of instances. Selecting a dimension will filter your metrics to isolate that particular group
    1. Check the link for additional information: https://codeburst.io/amazon-cloudwatch-metrics-by-example-249826b1404d
  5. Grouping: Metrics are grouped first by namespace, and then by the various dimension combinations within each namespace. For example, you can view all EC2 metrics, EC2 metrics grouped by instance, or EC2 metrics grouped by Auto Scaling group.
  6. Resolution: Each metric is one of the following
    1. Standard resolution, with data having a one-minute granularity
    2. High resolution, with data at a granularity of one second
  7. Statistics: Statistics are metric data aggregations over specified periods of time.
    1. Example : Min, Max, average, Sum, Percentice PNN.NN

Dashboards

Amazon CloudWatch dashboards are customizable home pages in the CloudWatch console that you can use to monitor your resources in a single view, even those resources that are spread across different Regions

  1. All dashboards are global, not Region-specific.
  2. Widget: A GUI element that displays metrics. Dashboard, usually, contains 2 or more widgets.
  3. Sharing dashboards
    1. Specific users : Share a single dashboard and designate specific email addresses of the people who can view the dashboard.
    2. Share publicly: Share a single dashboard publicly, so that anyone who has the link can view the dashboard.
    3. Share to sso users: Share all the CloudWatch dashboards in your account and specify a third-party single sign-on (SSO) provider for dashboard access. All users who are members of this SSO provider’s list can access all the dashboards in the account.
  4. Live data: You can choose whether your metric widgets display live data. Live data is data published within the last minute that has not been fully aggregated.
Cloudwatch logs

You can use Amazon CloudWatch Logs to monitor, store, and access your log files from Amazon Elastic Compute Cloud (Amazon EC2) instances, AWS CloudTrail, Route 53, and other sources.

  1. Log event: A log event is a record of some activity recorded by the application or resource being monitored. Log event contains
    1. Timestamp
    2. Event message
  2. Log stream: A log stream is a sequence of log events that share the same source. Example: Log stream for a lambda run.
  3. Log group: Log groups define groups of log streams that share the same retention, monitoring, and access control settings. Example a log group for a lambda.
  4. Retention settings: Retention settings can be used to specify how long log events are kept in CloudWatch Logs. Expired log events get deleted automatically.
  5. Metric filter: You can use metric filters to extract metric observations from ingested events and transform them to data points in a CloudWatch metric.
    Reference and image credit: https://www.sensedeep.com/blog/posts/stories/what-is-cloudwatch.html . This is an excellent blogpost from sensedeep.
  6. Subscriptions: You can use subscriptions to get access to a real-time feed of log events from CloudWatch Logs and have it delivered to other services such as an Amazon Kinesis stream, an Amazon Kinesis Data Firehose stream, or AWS Lambda for custom processing, analysis, or loading to other systems.

EventBridge
ServiceLens
Container Insights
Lambda Insights
Synthetics
Contributor Insights