Ref: https://learn.cantrill.io/courses/1820301/lectures/41301628
DEMO: https://learn.cantrill.io/courses/1820301/lectures/41301629
Amazon CloudWatch - Components and Architecture
- š§Ā Collects & manages operational data ā provides operational management & monitoring
- Operation data includes service performance, metrics, logsā¦
- Core support service used by almost all other AWS services
- Public service

- Three main components:
- CW Metrics = "CW itselfā (āVanillaā CW)
- e.g. CPU utilization of EC2 instance over time, disk usage on an on-premises serverā¦
- Can ingest metrics from AWS products, apps, or on-premises infrastructure
- Some metrics are gathered natively by AWS products
- Configuration of a CW Agent is needed for:
- Collecting metrics inside AWS that are not gathered natively
- e.g. internal processes in an EC2 instance
- Collecting metrics outside of AWS
- š”Ā Lots of metrics, must be kept divided
- CW Logs
- Can ingest logs from AWS products, apps, or on-premises infrastructure
- Some logs generated natively by AWS products, other products need CW Agent
- CW Alarms
- Trigger notifications (send to Amazon SNS) or events based on observed metrics
- e.g. ring an alarm and send SMS when CPU usage of my EC2 instance surpasses 90%
- š”Ā The simple Billing Alarm we set before was set with CW ā send a notification (email) when billing surpasses a budget
CW Events (nowadays Amazon EventBridge)
- Works with AWS services and schedules
- Generates events which can trigger actions (e.g. send a notification email)
- Events can be generated based on:
- condition (e.g. an EC2 instance is created or terminated)
- schedule (e.g. tomorrow at 13:45, or every Friday at 18:00)
Amazon CloudWatch - Key Concepts

- Datapoint = Timestamp + Value (Pair)
- e.g. CPU usage is 98.3% at 08:45:45 on 2019-12-03
- Metric = Sequence of datapoints ordered in time = Time-ordered set of datapoints
- e.g. CPU usage, NW I/O, Disk I/O⦠(in a given time frame)
- ā¼ļøĀ NOT necessarily related to a single server!
- e.g. CPU usage will be displaying by default the usage across all EC2 instances! Must specify otherwise if you want to limit to one instance!

- Namespace = Name container for monitoring data, contains name-related metrics
- š”Ā Keeps things from getting messy
- Can have any rule-complying name
- e.g.
AWS/
ā namespace where all AWS data goes to
- e.g.
AWS/EC2
ā namespace where all EC2 data goes to
- Dimensions = Criteria that separate datapoints of same metric into different perspectives
- e.g. Inside
AWS/EC2
namespace, separate into dimensions: Instance A, Instance Bā¦
- Powerful & Flexible

- Alarms take actions based on a specific metric reaching specified values/thresholds
- e.g. Send a notification when budget has been exceeded (billing alarm)
- States:
INSUFFICIENT DATA
(initial state), OK
or ALARM
- alarm uses Amazon SNS (Simple Notification System) when the state is
ALARM