Section Menu
- AWS CloudWatch Deep Dive
- AWS CloudWatch Dashboards
- AWS CloudWatch Alarms
- AWS CloudWatch Features
- Quiz
AWS CloudWatch Deep Dive
Key areas for using CloudWatch
- Monitor AWS infrastructure
- EC2, RDS, S3,Load Balancers, etc.
- No special code required to make this work…just use it
- Monitor applications and service via custom metrics
- Monitor log files
- Can also aggregate logs together into a single view
- Monitor and react to alarms
- Spike in CPU?
- Spin up new instance
- Add to load balancer
- Spike in CPU?
Possible Alarm States
- OK: Everything is within defined threshold
- Alarm: Outside of defined threshold
- Insufficient Data:
- Alarm has just started and metric is not yet available
- Enough data not available to determine the Alarm’s state
CloudWatch leans heavily on:
- SNS – Simple Notification Service
- SQS – Simple Queue Service
- Lamda
- Auto Scaling
- Many More
- New being added all the time
AWS CloudWatch Dashboards
Dashboards overview
- You can create as many dashboards as you wish
- Each Dashboard can have multiple widgets with different criteria
Demo
- CloudWatch > Dashboards > [Create dashboard]
- Name: no spaces
- [Create dashboard]
- Widgets
- Line Graph
- Stacked Graph: For viewing multiple metrics on same graph
- Results appear to be additive (.1 + .2 + .05=.35 total measurement.)
- Colors in the area below the line.
- Number: See the last value received
- Text: HTML style formatting using Markdown
- Widgets can contain:
- Data from one or more metrics
- Each metric will be in a different color.
- Data from completely different elements
- All graphs will be auto-scaled to fit all data
- Left and Right Y Axis limits
- Set minimum and maximum values to prevent auto scaling from making small values invisible because a large value might over-compress the remaining data.
- Data from one or more metrics
- Set the refresh interval
- 10 seconds, 1 min, 2 min, 5 min, 15 minutes
AWS CloudWatch Alarms
Demo
- CloudWatch > Alarms
- You can see how many alarms have been set for each alarm ‘state’: Alarm, Ok, Insufficient Data
- [Create alarm]
- Will see all metrics available for all AWS services in that Region
- As new services are deployed, their metrics will automatically become available.
- Metrics can be based on Average, Maximum or Minimum values.
- Time Period: 10 sec, 30 sec, 1 min, 5 min, 15 min, 30 min, 6 hrs, 1 day
- Consecutive Periods
- if a metric is broken for x number of Consecutive Time Periods
- Will see all metrics available for all AWS services in that Region
- Suggested to use multiple ‘Alarms’ such to send an alert when an alarm state returns to ‘OK’
AWS CloudWatch Features
Other features available with CloudWatch
Billing Alarms
- Create alarms on estimated charges and enable alerts
- These can be ‘Smart’ alerts that can decommission resources
Cloud Events
- Help you respond to state changes in your AWS resource pool.
- Events run specific tasks when resources change state.
- Example: Adding a new instance to our Domain automatically
Logs
- Logs are used to
- store
- view
- index
- search
- Logs generated from various AWS services such as
- Lamda
- RDS
- EC2
Metrics
- Monitor various metrics collected by AWS CloudWatch
Additional Features
- Auto Scaling integration and Descaling
- Scale based on
- Schedule
- Demand
- Utilization
- Scale down for low utilization or scale up if over x%
- Scale based on
- Reboot failed instances due to
- Loss of network connectivity
- System power
- other software or hardware issues
- Integrate with 3rd party monitoring tools
- Copper AG
- Stack Driver
- New Relic
- Create Custom Metrics
- Memory Utilization
- Once the metrics are created in CloudWatch, you can create alarms based on them.
- These require custom scripts that need to be installed.
- Memory Utilization: Memory used by applications and OS exclusive of the Cache and buffers as Percentage
- Memory Used: Memory used by applications and OS exclusive of the Cache and buffers in Megabytes
- Memory Available: Available memory displayed in Megabytes
- Disk
- Disk Space Utilization: Space used as a percentage
- Disk Space Used: In Gigabytes
- Disk Space Available: In Gigabytes
- Swap Space
- Utilization as a percentage
- Used in Megabytes
Quiz
Which of the following statements is TRUE for AWS CloudWatch
- Collects and monitors various metrics available to us within our AWS environment
- Integrates seamlessly with many different AWS services
- Using CloudWatch, users can setup various alarms and notifications
- All of the above
_______ is a prebuilt messaging service, which can be directly hooked with AWS CloudWatch.
- RDS
- ELB
- SNS
- EC2
CloudWatch Alarms have 3 possible states
- OK, Alarm and Insufficient Data
- OK, Resume and Insufficient Data
- Start, Alarm and Resume
- OK, Alarm and Sufficient Data
“The CloudWatch cannot collect and monitor any type of log files within the AWS cloud.”
- True
- False
“AWS CloudWatch Alarms can be setup based on CloudWatch metrics.”
- True
- False