AWS CloudWatch
cloud AWS

5 minutes


go back go back go back home home

Introduction

Following are some Important Metrics:

1. EC2 Instances
    i.      `CPU_UTILIZATION`, `STATUS_CHECK`, `NETWORK`, `RAM_UTILIZATION`, `NETWORK`, `LOGS`, `NO_OF_REQUESTS`, `...`
    ii.     Default metrics are updated every 5 mins (by default)
    iii.    There exist an option for detailed monitoring for higher price [for every 1 minute]
2. EBS Volumes: `DISK_READ`, `DISK_WRITE`
3. S3 Bucket: `BUCKET_SIZE_BYTES`, `NO_OF_OBJECTS`, `ALL_REQUESTS`
4. Billing: `TOTAL_ESTIMATED_CHARGE` 
5. Service Limits: How much you've been using a service API
6. Custom Metrics: Make your own Custom Metrics from available data.

CloudWatch - Alarms
- Alarms are used to trigger notifications for any metric.
- Alarm Actions:
    1. AutoScaling:     Increase/Decrease number of EC2 Instances to "desired" amount.
    2. EC2 Actions:     Stop/Terminate/Reboot/Recover an EC2 Instance
    3. SNS notification:Sends a notification into an SNS Topic.
- Various Options: Sampling, max(), min(), percentage(%), etc...
- Can choose the period on which to evaluate an alarm.
- Eg. Create a `Billing Alarm` on the CloudWatch Billing Metric
- Alarm Status: OK, INSUFFICIENT_DATA, ALARM

CloudWatch - Logs
# Cloudwatch logs can be collected from the following:
    - Elastic Beanstalk:        Collection of logs from Apps
    - ECS:                      Collection from Container
    - AWS Lambda:               Collection from Function Logs
    - CloudTrail:               Based on Filter
    - Route 53:                 Log DNA Queries
    - CloudWatch Log Agent on EC2 machine, or on on-prem server.

CloudWatch - Logs for EC2