SlideShare a Scribd company logo
AWS Cloudwatch
Felipe Almeida (http://queirozf.com)
Monitoring AWS Services with Metrics and
Alarms
Structure
● Intro
● Usage
● Metrics - Builtin
● Metrics - Custom
● Alarms
● Events
● Logs
● Third-party services
● Keep in mind
2
Intro
● CloudWatch is the AWS metric collection service
3
Intro
● CloudWatch is the AWS metric collection service
● Metrics are individual measurements of some quantity of interest,
at a given point in time:
4
Intro
● CloudWatch is the AWS metric collection service
● Metrics are individual measurements of some quantity of interest,
at a given point in time:
Examples:
● At 23:45:29 GMT, on 23 February 2016, CPU usage for
instance XPTO was 56%
5
Intro
● Nearly all AWS services can be monitored using CloudWatch
6
Intro
● Nearly all AWS services can be monitored using CloudWatch
● Metrics provide visibility into your applications
7
Intro
● Nearly all AWS services can be monitored using CloudWatch
● Metrics provide visibility into your applications
● They enable you to make informed decisions such as
8
Intro
● Nearly all AWS services can be monitored using CloudWatch
● Metrics provide visibility into your applications
● They enable you to make informed decisions such as
○ Whether to downscale a machine that’s not being used too
much (save $$)
9
Intro
● Nearly all AWS services can be monitored using CloudWatch
● Metrics provide visibility into your applications
● They enable you to make informed decisions such as
○ Whether to downscale a machine that’s not being used too
much (save $$)
○ Whether to scale up a machine that’s close to full capacity
(avoid failures)
10
Intro
● Nearly all AWS services can be monitored using CloudWatch
● Metrics provide visibility into your applications
● They enable you to make informed decisions such as
○ Whether to downscale a machine that’s not being used too
much (save $$)
○ Whether to scale up a machine that’s close to full capacity
(avoid failures)
○ Decide what caused an application to fail (debug)
11
Usage
● You can use CloudWatch in multiple ways:
12
Usage
● You can use CloudWatch in multiple ways:
○ Using the AWS Console
13
Usage
● You can use CloudWatch in multiple ways:
○ Using the AWS Console
○ Via other services that have monitoring functionality
14
Usage
● You can use CloudWatch in multiple ways:
○ Using the AWS Console
○ Via other services that have monitoring functionality
○ Using the CloudWatch API through the AWS SDK
15
Usage - Console
● Via cloudwatch itself (on the console)
16
Usage - Console
● You can build a Dashboard with metrics you choose
17
Usage - Via other services
● Via other services
○ Nearly all services have a monitoring or metrics tab
18EMR
Usage - Via other services
19Elastic Beanstalk
Usage - Via other services
20DynamoDB Table
Usage - Via other services
● When you open the monitoring tab for a service, what you’re
looking at are actually CloudWatch Metrics:
21
Monitoring Tab for an
Elastic Beanstalk
Environment uses
CloudWatch Metrics
Usage - API
● CloudWatch (like most AWS Services) can also be used
programatically
○ I.e. it has an API that you can use via the AWS SDK (library for
Java, .NET, Python, etc)
22
Metrics - Builtin
● Services usually have a set of builtin metrics
23
Metrics - Builtin
● Services usually have a set of builtin metrics
○ These metrics are collected by default
24
Metrics - Builtin
● For example, the following metrics (not exhaustive list) are
collected by default for EC2 Instances:
○ CPUUtilization (percent)
○ DiskReadBytes (bytes)
○ DiskWriteBytes (bytes)
○ NetworkIn (bytes)
○ NetworkOut (bytes)
25
Metrics - Custom
● You can also use CloudWatch for your own metrics.
26
Metrics - Custom
● You can also use CloudWatch for your own metrics.
● You can then do anything you can for regular (builtin) metrics,
such as:
27
Metrics - Custom
● You can also use CloudWatch for your own metrics.
● You can then do anything you can for regular (builtin) metrics,
such as:
○ View them on the AWS console
○ Create Dashboards for them
○ Set up alarms
28
Metrics - Custom
● For some types of custom metrics, there are community-provided
scripts to help you publish them to CloudWatch, such as:
○ Memory utilization for EC2 Instances
○ Swap Utilization for EC2 Instances
○ Disk Space Usage for EC2 Instances
29
Metrics - Custom
● For some types of custom metrics, there are community-provided
scripts to help you publish them to CloudWatch, such as:
○ Memory utilization for EC2 Instances
○ Swap Utilization for EC2 Instances
○ Disk Space Usage for EC2 Instances
● These metrics are controlled by the O.S. and therefore cannot be
accessed automatically by AWS.
30
Alarms
● You can also create alarms for any individual metric on
CloudWatch, which are triggered if the criteria you have defined are
met
31
Alarms
● You can also create alarms for any individual metric on
CloudWatch, which are triggered if the criteria you have defined are
met
● For example, you can have AWS send you an e-mail if
FreeStorageSpace metric for a ElasticSearch cluster you have
becomes lower than 10GB.
32
Alarms
● In addition to notifying you when something happens, you can also
configure AutoScaling Actions to be taken if some criteria are
met:
33
Alarms
● In addition to notifying you when something happens, you can also
configure AutoScaling Actions to be taken if some criteria are
met:
○ For example, if the CPUUtilization metric reaches 90% for
all machines in a AutoScaling Group, add extra instances to
that environment
34
Events
● CloudWatch Events are a new addition in CloudWatch
35
Events
● CloudWatch Events are a new addition in CloudWatch
● They enable you to execute custom actions in response to State
Changes such as
○ An EC2 instance has been started
○ An EC2 instance has been terminated
36
Events
● CloudWatch Events are a new addition in CloudWatch
● They enable you to execute custom actions in response to State
Changes such as
○ An EC2 instance has been started
○ An EC2 instance has been terminated
● Custom actions include running a Lambda Function, publishing the
event to Kinesis, etc.
37
Logs
● CloudWatch Logs refers to Agents you can install on your
instances to have them send application logs to CloudWatch
● You can filter your logs and set up Alarms when certain criteria are
met, such as:
○ There have been more than 10 Errors in Apache in the last
minute
○ There have been 5 log messages matching
“IllegalArgumentException” in the last hour
38
Related Services (Third-Party)
● There are tons of third-party services that build on top of or
otherwise leverage CloudWatch metrics, such as:
○ SignalFX (extends and sends custom metrics to CloudWatch)
○ AppDynamics (sends all sorts of low-level and
application-level metrics to CloudWatch and displays them in
an unified manner; also provides event correlation)
○ NewRelic (sends data to CLoudWatch)
○ Grafana (uses CloudWatch as a Data source)
○ Logstash (you can use CloudWatch as an output)
○ Nagios (consumes CloudWatch metrics)
39
Keep in mind
● Metrics last 2 weeks by default
40
Keep in mind
● Metrics last 2 weeks by default
● Metrics are per-region
41
Keep in mind
● Metrics last 2 weeks by default
● Metrics are per-region
● Some services (e.g. Elastic BeanStalk) have extra metrics that
need to be explicitly enabled before they can be used.
42
Keep in mind
● Metrics last 2 weeks by default
● Metrics are per-region
● Some services (e.g. Elastic BeanStalk) have extra metrics that
need to be explicitly enabled before they can be used.
● CloudWatch can also be used to monitor AWS Costs (Billing), even
though it’s not a service per se
43
Keep in mind
● In order to publish custom Amazon CloudWatch metrics, the
instances in your environment need permission to use
CloudWatch (see your instance profile for more information).
44
Keep in mind
● In order to publish custom Amazon CloudWatch metrics, the
instances in your environment need permission to use
CloudWatch (see your instance profile for more information).
● CloudWatch is not free so you may want to track only relevant
metrics
45
Keep in mind
● In order to publish custom Amazon CloudWatch metrics, the
instances in your environment need permission to use
CloudWatch (see your instance profile for more information).
● CloudWatch is not free so you may want to track only relevant
metrics
○ In addition, if you use CloudWatch via the AWS SDK, try to
collect high-level metrics to keep cost down
■ E.g. track BeanStalk metrics rather than metrics for
individual instances
46
Links
● Monitoring Scripts for Linux EC2 Instances
● All Builtin Metrics for all supported AWS services
● AWS CloudWatch Pricing
47

More Related Content

PPTX
AWS CloudWatch
PDF
Aws cloud watch
PPTX
AWS Cloud Watch
PDF
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
PPTX
AWS Cloud trail
PDF
Cloudwatch: Monitoring your AWS services with Metrics and Alarms
PDF
20180509 AWS Black Belt Online Seminar Amazon GuardDuty
PPT
Auto Scaling on AWS
AWS CloudWatch
Aws cloud watch
AWS Cloud Watch
Amazon CloudWatch Tutorial | AWS Certification | Cloud Monitoring Tools | AWS...
AWS Cloud trail
Cloudwatch: Monitoring your AWS services with Metrics and Alarms
20180509 AWS Black Belt Online Seminar Amazon GuardDuty
Auto Scaling on AWS

What's hot (20)

PDF
Let's Talk About: Azure Monitor
PPTX
AWS Storage - S3 Fundamentals
PDF
Arm 기반의 AWS Graviton 프로세서로 구동되는 AWS 인스턴스 살펴보기 - 김종선, AWS솔루션즈 아키텍트:: AWS Summi...
PDF
Black Belt Online Seminar Amazon CloudWatch
PDF
20180322 AWS Black Belt Online Seminar AWS Snowball Edge
PDF
20170621 aws-black belt-ads-sms
PPTX
PDF
AWS Black Belt Online Seminar 2017 Amazon EC2
PDF
AWS 101: Introduction to AWS
PPTX
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptx
PDF
AWS 클라우드 보안 및 규정 준수 소개 (박철수) - AWS 웨비나 시리즈
PDF
AWS Black Belt Online Seminar 2017 AWS Storage Gateway
PDF
AWS Black Belt Online Seminar 2017 Amazon VPC
PDF
실전! AWS 하이브리드 네트워킹 (AWS Direct Connect 및 VPN 데모 세션) - 강동환, AWS 솔루션즈 아키텍트:: A...
PDF
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
PDF
20191002 AWS Black Belt Online Seminar Amazon EC2 Auto Scaling and AWS Auto S...
PDF
[AKIBA.AWS] VGWのルーティング仕様
PDF
AWS Control Tower
PDF
AWS Basics .pdf
Let's Talk About: Azure Monitor
AWS Storage - S3 Fundamentals
Arm 기반의 AWS Graviton 프로세서로 구동되는 AWS 인스턴스 살펴보기 - 김종선, AWS솔루션즈 아키텍트:: AWS Summi...
Black Belt Online Seminar Amazon CloudWatch
20180322 AWS Black Belt Online Seminar AWS Snowball Edge
20170621 aws-black belt-ads-sms
AWS Black Belt Online Seminar 2017 Amazon EC2
AWS 101: Introduction to AWS
Joel Schuweiler_AWS IAM Identity Center (Single Sign On).pptx
AWS 클라우드 보안 및 규정 준수 소개 (박철수) - AWS 웨비나 시리즈
AWS Black Belt Online Seminar 2017 AWS Storage Gateway
AWS Black Belt Online Seminar 2017 Amazon VPC
실전! AWS 하이브리드 네트워킹 (AWS Direct Connect 및 VPN 데모 세션) - 강동환, AWS 솔루션즈 아키텍트:: A...
KB국민은행은 시작했다 -  쉽고 빠른 클라우드 거버넌스 적용 전략 - 강병억 AWS 솔루션즈 아키텍트 / 장강홍 클라우드플랫폼단 차장, ...
20191002 AWS Black Belt Online Seminar Amazon EC2 Auto Scaling and AWS Auto S...
[AKIBA.AWS] VGWのルーティング仕様
AWS Control Tower
AWS Basics .pdf
Ad

Viewers also liked (20)

PDF
Aws cost optimization: lessons learned, strategies, tips and tools
PDF
Elasticsearch for Data Analytics
PDF
Online Machine Learning: introduction and examples
PPTX
Using AWS CloudWatch Custom Metrics and EC2 Auto Scaling -VSocial Infrastructure
PDF
Whoscall 的 Realtime Monitoring 經驗分享
PDF
DevOps on AWS
PPTX
Chapitre 6: III. Le renoncement à l'attaque
PDF
Isep master thesis
PPTX
Cloud watchingwithcloudwatch
PPTX
Cloudreach Voices AWS CloudWatch and Smart Monitoring
PDF
Tackling a 1 billion member social network
PDF
Modern Monitoring - devops roadtrip
PDF
CloudWatch Custom Metrics
PDF
Monitoring, Hold the Infrastructure
PPTX
Site24x7 PHP Monitoring for DevOps
PPTX
Cloud watch
PDF
Manage Security & Compliance of Your AWS Account using CloudTrail
PDF
Monitoring Your AWS Cloud Infrastructure
PDF
Monitoring 改造計畫:流程觀點
PPTX
Alfredo Reino - Monitoring aws and azure
Aws cost optimization: lessons learned, strategies, tips and tools
Elasticsearch for Data Analytics
Online Machine Learning: introduction and examples
Using AWS CloudWatch Custom Metrics and EC2 Auto Scaling -VSocial Infrastructure
Whoscall 的 Realtime Monitoring 經驗分享
DevOps on AWS
Chapitre 6: III. Le renoncement à l'attaque
Isep master thesis
Cloud watchingwithcloudwatch
Cloudreach Voices AWS CloudWatch and Smart Monitoring
Tackling a 1 billion member social network
Modern Monitoring - devops roadtrip
CloudWatch Custom Metrics
Monitoring, Hold the Infrastructure
Site24x7 PHP Monitoring for DevOps
Cloud watch
Manage Security & Compliance of Your AWS Account using CloudTrail
Monitoring Your AWS Cloud Infrastructure
Monitoring 改造計畫:流程觀點
Alfredo Reino - Monitoring aws and azure
Ad

Similar to Cloudwatch: Monitoring your Services with Metrics and Alarms (20)

PDF
Application & Account Monitoring in AWS
PDF
Build a custom metrics on aws cloud
PDF
PostgreSQL on AWS Aurora/Azure Cosmos VS EC2/Azure VMs
PDF
Training AWS: Module 9 - CloudWatch
PDF
Adaptive Scaling of Microgateways on Kubernetes
PDF
Intro to Kubernetes & GitOps Workshop
PPTX
Jamcracker Cloud Management Platform: Control, Govern and Manage Enterprise C...
PDF
Deploying WSO2 API Manager in Production-Grade Kubernetes
PPTX
Hybrid Cloud Management and Orchestration : The Complete Solution
PDF
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
PDF
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
PDF
AWS Bulgaria: Re:invent 2017 Recap
PPTX
Accelerate Your Development: CI/CD using AWS and Serverless
PDF
Scaling Monitoring At Databricks From Prometheus to M3
PDF
Data Science in the Cloud @StitchFix
PDF
Autoscaling Kubernetes
PDF
Get Ready to Become Google Associate Cloud Engineer
PDF
Kks sre book_ch10
PDF
Monitoring kubernetes across data center and cloud
PDF
Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017
Application & Account Monitoring in AWS
Build a custom metrics on aws cloud
PostgreSQL on AWS Aurora/Azure Cosmos VS EC2/Azure VMs
Training AWS: Module 9 - CloudWatch
Adaptive Scaling of Microgateways on Kubernetes
Intro to Kubernetes & GitOps Workshop
Jamcracker Cloud Management Platform: Control, Govern and Manage Enterprise C...
Deploying WSO2 API Manager in Production-Grade Kubernetes
Hybrid Cloud Management and Orchestration : The Complete Solution
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
AWS Bulgaria: Re:invent 2017 Recap
Accelerate Your Development: CI/CD using AWS and Serverless
Scaling Monitoring At Databricks From Prometheus to M3
Data Science in the Cloud @StitchFix
Autoscaling Kubernetes
Get Ready to Become Google Associate Cloud Engineer
Kks sre book_ch10
Monitoring kubernetes across data center and cloud
Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017

More from Felipe (15)

PDF
Aula rotulação automática - Automatic tagging
PDF
First steps with Keras 2: A tutorial with Examples
PDF
Word embeddings introdução, motivação e exemplos
PDF
Cloud Certifications - Overview
PDF
Exemplos de uso de apache spark usando aws elastic map reduce
PDF
Pré processamento de grandes dados com Apache Spark
PDF
Hadoop MapReduce and Apache Spark on EMR: comparing performance for distribut...
PDF
Boas práticas no desenvolvimento de software
PDF
Rachinations
PDF
Ausgewählte preußische Tugenden
PDF
Short intro to scala and the play framework
PDF
Conceitos e exemplos em versionamento de código
PDF
DevOps Series: Extending vagrant with Puppet for configuration management
PDF
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
PDF
D3.js 30-minute intro
Aula rotulação automática - Automatic tagging
First steps with Keras 2: A tutorial with Examples
Word embeddings introdução, motivação e exemplos
Cloud Certifications - Overview
Exemplos de uso de apache spark usando aws elastic map reduce
Pré processamento de grandes dados com Apache Spark
Hadoop MapReduce and Apache Spark on EMR: comparing performance for distribut...
Boas práticas no desenvolvimento de software
Rachinations
Ausgewählte preußische Tugenden
Short intro to scala and the play framework
Conceitos e exemplos em versionamento de código
DevOps Series: Extending vagrant with Puppet for configuration management
DevOps Series: Defining and Sharing Testable Machine Configurations with vagrant
D3.js 30-minute intro

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Machine learning based COVID-19 study performance prediction
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Electronic commerce courselecture one. Pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Modernizing your data center with Dell and AMD
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Big Data Technologies - Introduction.pptx
Cloud computing and distributed systems.
The Rise and Fall of 3GPP – Time for a Sabbatical?
Understanding_Digital_Forensics_Presentation.pptx
Unlocking AI with Model Context Protocol (MCP)
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Network Security Unit 5.pdf for BCA BBA.
Machine learning based COVID-19 study performance prediction
Encapsulation_ Review paper, used for researhc scholars
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
The AUB Centre for AI in Media Proposal.docx
Electronic commerce courselecture one. Pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Modernizing your data center with Dell and AMD
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
NewMind AI Monthly Chronicles - July 2025
Big Data Technologies - Introduction.pptx

Cloudwatch: Monitoring your Services with Metrics and Alarms

  • 1. AWS Cloudwatch Felipe Almeida (http://queirozf.com) Monitoring AWS Services with Metrics and Alarms
  • 2. Structure ● Intro ● Usage ● Metrics - Builtin ● Metrics - Custom ● Alarms ● Events ● Logs ● Third-party services ● Keep in mind 2
  • 3. Intro ● CloudWatch is the AWS metric collection service 3
  • 4. Intro ● CloudWatch is the AWS metric collection service ● Metrics are individual measurements of some quantity of interest, at a given point in time: 4
  • 5. Intro ● CloudWatch is the AWS metric collection service ● Metrics are individual measurements of some quantity of interest, at a given point in time: Examples: ● At 23:45:29 GMT, on 23 February 2016, CPU usage for instance XPTO was 56% 5
  • 6. Intro ● Nearly all AWS services can be monitored using CloudWatch 6
  • 7. Intro ● Nearly all AWS services can be monitored using CloudWatch ● Metrics provide visibility into your applications 7
  • 8. Intro ● Nearly all AWS services can be monitored using CloudWatch ● Metrics provide visibility into your applications ● They enable you to make informed decisions such as 8
  • 9. Intro ● Nearly all AWS services can be monitored using CloudWatch ● Metrics provide visibility into your applications ● They enable you to make informed decisions such as ○ Whether to downscale a machine that’s not being used too much (save $$) 9
  • 10. Intro ● Nearly all AWS services can be monitored using CloudWatch ● Metrics provide visibility into your applications ● They enable you to make informed decisions such as ○ Whether to downscale a machine that’s not being used too much (save $$) ○ Whether to scale up a machine that’s close to full capacity (avoid failures) 10
  • 11. Intro ● Nearly all AWS services can be monitored using CloudWatch ● Metrics provide visibility into your applications ● They enable you to make informed decisions such as ○ Whether to downscale a machine that’s not being used too much (save $$) ○ Whether to scale up a machine that’s close to full capacity (avoid failures) ○ Decide what caused an application to fail (debug) 11
  • 12. Usage ● You can use CloudWatch in multiple ways: 12
  • 13. Usage ● You can use CloudWatch in multiple ways: ○ Using the AWS Console 13
  • 14. Usage ● You can use CloudWatch in multiple ways: ○ Using the AWS Console ○ Via other services that have monitoring functionality 14
  • 15. Usage ● You can use CloudWatch in multiple ways: ○ Using the AWS Console ○ Via other services that have monitoring functionality ○ Using the CloudWatch API through the AWS SDK 15
  • 16. Usage - Console ● Via cloudwatch itself (on the console) 16
  • 17. Usage - Console ● You can build a Dashboard with metrics you choose 17
  • 18. Usage - Via other services ● Via other services ○ Nearly all services have a monitoring or metrics tab 18EMR
  • 19. Usage - Via other services 19Elastic Beanstalk
  • 20. Usage - Via other services 20DynamoDB Table
  • 21. Usage - Via other services ● When you open the monitoring tab for a service, what you’re looking at are actually CloudWatch Metrics: 21 Monitoring Tab for an Elastic Beanstalk Environment uses CloudWatch Metrics
  • 22. Usage - API ● CloudWatch (like most AWS Services) can also be used programatically ○ I.e. it has an API that you can use via the AWS SDK (library for Java, .NET, Python, etc) 22
  • 23. Metrics - Builtin ● Services usually have a set of builtin metrics 23
  • 24. Metrics - Builtin ● Services usually have a set of builtin metrics ○ These metrics are collected by default 24
  • 25. Metrics - Builtin ● For example, the following metrics (not exhaustive list) are collected by default for EC2 Instances: ○ CPUUtilization (percent) ○ DiskReadBytes (bytes) ○ DiskWriteBytes (bytes) ○ NetworkIn (bytes) ○ NetworkOut (bytes) 25
  • 26. Metrics - Custom ● You can also use CloudWatch for your own metrics. 26
  • 27. Metrics - Custom ● You can also use CloudWatch for your own metrics. ● You can then do anything you can for regular (builtin) metrics, such as: 27
  • 28. Metrics - Custom ● You can also use CloudWatch for your own metrics. ● You can then do anything you can for regular (builtin) metrics, such as: ○ View them on the AWS console ○ Create Dashboards for them ○ Set up alarms 28
  • 29. Metrics - Custom ● For some types of custom metrics, there are community-provided scripts to help you publish them to CloudWatch, such as: ○ Memory utilization for EC2 Instances ○ Swap Utilization for EC2 Instances ○ Disk Space Usage for EC2 Instances 29
  • 30. Metrics - Custom ● For some types of custom metrics, there are community-provided scripts to help you publish them to CloudWatch, such as: ○ Memory utilization for EC2 Instances ○ Swap Utilization for EC2 Instances ○ Disk Space Usage for EC2 Instances ● These metrics are controlled by the O.S. and therefore cannot be accessed automatically by AWS. 30
  • 31. Alarms ● You can also create alarms for any individual metric on CloudWatch, which are triggered if the criteria you have defined are met 31
  • 32. Alarms ● You can also create alarms for any individual metric on CloudWatch, which are triggered if the criteria you have defined are met ● For example, you can have AWS send you an e-mail if FreeStorageSpace metric for a ElasticSearch cluster you have becomes lower than 10GB. 32
  • 33. Alarms ● In addition to notifying you when something happens, you can also configure AutoScaling Actions to be taken if some criteria are met: 33
  • 34. Alarms ● In addition to notifying you when something happens, you can also configure AutoScaling Actions to be taken if some criteria are met: ○ For example, if the CPUUtilization metric reaches 90% for all machines in a AutoScaling Group, add extra instances to that environment 34
  • 35. Events ● CloudWatch Events are a new addition in CloudWatch 35
  • 36. Events ● CloudWatch Events are a new addition in CloudWatch ● They enable you to execute custom actions in response to State Changes such as ○ An EC2 instance has been started ○ An EC2 instance has been terminated 36
  • 37. Events ● CloudWatch Events are a new addition in CloudWatch ● They enable you to execute custom actions in response to State Changes such as ○ An EC2 instance has been started ○ An EC2 instance has been terminated ● Custom actions include running a Lambda Function, publishing the event to Kinesis, etc. 37
  • 38. Logs ● CloudWatch Logs refers to Agents you can install on your instances to have them send application logs to CloudWatch ● You can filter your logs and set up Alarms when certain criteria are met, such as: ○ There have been more than 10 Errors in Apache in the last minute ○ There have been 5 log messages matching “IllegalArgumentException” in the last hour 38
  • 39. Related Services (Third-Party) ● There are tons of third-party services that build on top of or otherwise leverage CloudWatch metrics, such as: ○ SignalFX (extends and sends custom metrics to CloudWatch) ○ AppDynamics (sends all sorts of low-level and application-level metrics to CloudWatch and displays them in an unified manner; also provides event correlation) ○ NewRelic (sends data to CLoudWatch) ○ Grafana (uses CloudWatch as a Data source) ○ Logstash (you can use CloudWatch as an output) ○ Nagios (consumes CloudWatch metrics) 39
  • 40. Keep in mind ● Metrics last 2 weeks by default 40
  • 41. Keep in mind ● Metrics last 2 weeks by default ● Metrics are per-region 41
  • 42. Keep in mind ● Metrics last 2 weeks by default ● Metrics are per-region ● Some services (e.g. Elastic BeanStalk) have extra metrics that need to be explicitly enabled before they can be used. 42
  • 43. Keep in mind ● Metrics last 2 weeks by default ● Metrics are per-region ● Some services (e.g. Elastic BeanStalk) have extra metrics that need to be explicitly enabled before they can be used. ● CloudWatch can also be used to monitor AWS Costs (Billing), even though it’s not a service per se 43
  • 44. Keep in mind ● In order to publish custom Amazon CloudWatch metrics, the instances in your environment need permission to use CloudWatch (see your instance profile for more information). 44
  • 45. Keep in mind ● In order to publish custom Amazon CloudWatch metrics, the instances in your environment need permission to use CloudWatch (see your instance profile for more information). ● CloudWatch is not free so you may want to track only relevant metrics 45
  • 46. Keep in mind ● In order to publish custom Amazon CloudWatch metrics, the instances in your environment need permission to use CloudWatch (see your instance profile for more information). ● CloudWatch is not free so you may want to track only relevant metrics ○ In addition, if you use CloudWatch via the AWS SDK, try to collect high-level metrics to keep cost down ■ E.g. track BeanStalk metrics rather than metrics for individual instances 46
  • 47. Links ● Monitoring Scripts for Linux EC2 Instances ● All Builtin Metrics for all supported AWS services ● AWS CloudWatch Pricing 47