SlideShare uma empresa Scribd logo
1 de 47
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

10월 웨비나 - AWS에서 Active Directory 구축 및 연동 옵션 살펴보기 (김용우 솔루션즈 아키텍트)
10월 웨비나 - AWS에서 Active Directory 구축 및 연동 옵션 살펴보기 (김용우 솔루션즈 아키텍트)10월 웨비나 - AWS에서 Active Directory 구축 및 연동 옵션 살펴보기 (김용우 솔루션즈 아키텍트)
10월 웨비나 - AWS에서 Active Directory 구축 및 연동 옵션 살펴보기 (김용우 솔루션즈 아키텍트)
Amazon Web Services Korea
 

Mais procurados (20)

Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless Applications
 
10월 웨비나 - AWS에서 Active Directory 구축 및 연동 옵션 살펴보기 (김용우 솔루션즈 아키텍트)
10월 웨비나 - AWS에서 Active Directory 구축 및 연동 옵션 살펴보기 (김용우 솔루션즈 아키텍트)10월 웨비나 - AWS에서 Active Directory 구축 및 연동 옵션 살펴보기 (김용우 솔루션즈 아키텍트)
10월 웨비나 - AWS에서 Active Directory 구축 및 연동 옵션 살펴보기 (김용우 솔루션즈 아키텍트)
 
Auto Scaling on AWS
Auto Scaling on AWSAuto Scaling on AWS
Auto Scaling on AWS
 
Introduction to AWS Cost Management
Introduction to AWS Cost ManagementIntroduction to AWS Cost Management
Introduction to AWS Cost Management
 
Intro to AWS: EC2 & Compute Services
Intro to AWS: EC2 & Compute ServicesIntro to AWS: EC2 & Compute Services
Intro to AWS: EC2 & Compute Services
 
AWS Cloud Watch
AWS Cloud WatchAWS Cloud Watch
AWS Cloud Watch
 
클라우드 비용, 어떻게 줄일 수 있을까? - 구본민, AWS 클라우드 파이넌셜 매니저 :: AWS Builders 100
클라우드 비용, 어떻게 줄일 수 있을까? - 구본민, AWS 클라우드 파이넌셜 매니저 :: AWS Builders 100클라우드 비용, 어떻게 줄일 수 있을까? - 구본민, AWS 클라우드 파이넌셜 매니저 :: AWS Builders 100
클라우드 비용, 어떻게 줄일 수 있을까? - 구본민, AWS 클라우드 파이넌셜 매니저 :: AWS Builders 100
 
Amazon services ec2
Amazon services ec2Amazon services ec2
Amazon services ec2
 
Amazon EC2 Masterclass
Amazon EC2 MasterclassAmazon EC2 Masterclass
Amazon EC2 Masterclass
 
AWS 클라우드 서비스 소개 및 사례 (방희란) - AWS 101 세미나
AWS 클라우드 서비스 소개 및 사례 (방희란) - AWS 101 세미나AWS 클라우드 서비스 소개 및 사례 (방희란) - AWS 101 세미나
AWS 클라우드 서비스 소개 및 사례 (방희란) - AWS 101 세미나
 
Basics AWS Presentation
Basics AWS PresentationBasics AWS Presentation
Basics AWS Presentation
 
AWS Systems manager 2019
AWS Systems manager 2019AWS Systems manager 2019
AWS Systems manager 2019
 
Intro to Amazon ECS
Intro to Amazon ECSIntro to Amazon ECS
Intro to Amazon ECS
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
RMG203 Cloud Infrastructure and Application Monitoring with Amazon CloudWatch...
RMG203 Cloud Infrastructure and Application Monitoring with Amazon CloudWatch...RMG203 Cloud Infrastructure and Application Monitoring with Amazon CloudWatch...
RMG203 Cloud Infrastructure and Application Monitoring with Amazon CloudWatch...
 
Amazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
Amazon RDS: Deep Dive - SRV310 - Chicago AWS SummitAmazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
Amazon RDS: Deep Dive - SRV310 - Chicago AWS Summit
 
AWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless CloudAWS Lambda and the Serverless Cloud
AWS Lambda and the Serverless Cloud
 
AWS KMS 에서 제공하는 봉투암호화 방식의 암호화 및 사이닝 기능에 대한 소개와 실습 - 신은수, AWS 솔루션즈 아키텍트 :: AWS...
AWS KMS 에서 제공하는 봉투암호화 방식의 암호화 및 사이닝 기능에 대한 소개와 실습 - 신은수, AWS 솔루션즈 아키텍트 :: AWS...AWS KMS 에서 제공하는 봉투암호화 방식의 암호화 및 사이닝 기능에 대한 소개와 실습 - 신은수, AWS 솔루션즈 아키텍트 :: AWS...
AWS KMS 에서 제공하는 봉투암호화 방식의 암호화 및 사이닝 기능에 대한 소개와 실습 - 신은수, AWS 솔루션즈 아키텍트 :: AWS...
 
Cost Optimization on AWS
Cost Optimization on AWSCost Optimization on AWS
Cost Optimization on AWS
 
Aws
AwsAws
Aws
 

Destaque

SRG302 Archiving in the Cloud using Amazon Glacier - AWS re: Invent 2012
SRG302 Archiving in the Cloud using Amazon Glacier - AWS re: Invent 2012SRG302 Archiving in the Cloud using Amazon Glacier - AWS re: Invent 2012
SRG302 Archiving in the Cloud using Amazon Glacier - AWS re: Invent 2012
Amazon Web Services
 

Destaque (20)

Aws cost optimization: lessons learned, strategies, tips and tools
Aws cost optimization: lessons learned, strategies, tips and toolsAws cost optimization: lessons learned, strategies, tips and tools
Aws cost optimization: lessons learned, strategies, tips and tools
 
Elasticsearch for Data Analytics
Elasticsearch for Data AnalyticsElasticsearch for Data Analytics
Elasticsearch for Data Analytics
 
Online Machine Learning: introduction and examples
Online Machine Learning:  introduction and examplesOnline Machine Learning:  introduction and examples
Online Machine Learning: introduction and examples
 
Using AWS CloudWatch Custom Metrics and EC2 Auto Scaling -VSocial Infrastructure
Using AWS CloudWatch Custom Metrics and EC2 Auto Scaling -VSocial InfrastructureUsing AWS CloudWatch Custom Metrics and EC2 Auto Scaling -VSocial Infrastructure
Using AWS CloudWatch Custom Metrics and EC2 Auto Scaling -VSocial Infrastructure
 
Whoscall 的 Realtime Monitoring 經驗分享
Whoscall 的 Realtime Monitoring 經驗分享Whoscall 的 Realtime Monitoring 經驗分享
Whoscall 的 Realtime Monitoring 經驗分享
 
Revolutionising Cloud Operations with AWS Config, AWS CloudTrail and AWS Clou...
Revolutionising Cloud Operations with AWS Config, AWS CloudTrail and AWS Clou...Revolutionising Cloud Operations with AWS Config, AWS CloudTrail and AWS Clou...
Revolutionising Cloud Operations with AWS Config, AWS CloudTrail and AWS Clou...
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
Chapitre 6: III. Le renoncement à l'attaque
Chapitre 6: III. Le renoncement à l'attaqueChapitre 6: III. Le renoncement à l'attaque
Chapitre 6: III. Le renoncement à l'attaque
 
Isep master thesis
Isep master thesisIsep master thesis
Isep master thesis
 
Cloud watchingwithcloudwatch
Cloud watchingwithcloudwatchCloud watchingwithcloudwatch
Cloud watchingwithcloudwatch
 
Cloudreach Voices AWS CloudWatch and Smart Monitoring
Cloudreach Voices AWS CloudWatch and Smart MonitoringCloudreach Voices AWS CloudWatch and Smart Monitoring
Cloudreach Voices AWS CloudWatch and Smart Monitoring
 
Tackling a 1 billion member social network
Tackling a 1 billion member social networkTackling a 1 billion member social network
Tackling a 1 billion member social network
 
Improve monitoring and monetization of your mobile apps
Improve monitoring and monetization of your mobile appsImprove monitoring and monetization of your mobile apps
Improve monitoring and monetization of your mobile apps
 
Modern Monitoring - devops roadtrip
Modern Monitoring - devops roadtripModern Monitoring - devops roadtrip
Modern Monitoring - devops roadtrip
 
SRG302 Archiving in the Cloud using Amazon Glacier - AWS re: Invent 2012
SRG302 Archiving in the Cloud using Amazon Glacier - AWS re: Invent 2012SRG302 Archiving in the Cloud using Amazon Glacier - AWS re: Invent 2012
SRG302 Archiving in the Cloud using Amazon Glacier - AWS re: Invent 2012
 
CloudWatch Custom Metrics
CloudWatch Custom MetricsCloudWatch Custom Metrics
CloudWatch Custom Metrics
 
Monitoring, Hold the Infrastructure
Monitoring, Hold the InfrastructureMonitoring, Hold the Infrastructure
Monitoring, Hold the Infrastructure
 
Site24x7 PHP Monitoring for DevOps
Site24x7 PHP Monitoring for DevOpsSite24x7 PHP Monitoring for DevOps
Site24x7 PHP Monitoring for DevOps
 
Cloud watch
Cloud watchCloud watch
Cloud watch
 
Manage Security & Compliance of Your AWS Account using CloudTrail
Manage Security & Compliance of Your AWS Account using CloudTrailManage Security & Compliance of Your AWS Account using CloudTrail
Manage Security & Compliance of Your AWS Account using CloudTrail
 

Semelhante a Cloudwatch: Monitoring your Services with Metrics and Alarms

Semelhante a Cloudwatch: Monitoring your Services with Metrics and Alarms (20)

Application & Account Monitoring in AWS
Application & Account Monitoring in AWSApplication & Account Monitoring in AWS
Application & Account Monitoring in AWS
 
Build a custom metrics on aws cloud
Build a custom metrics on aws cloudBuild a custom metrics on aws cloud
Build a custom metrics on aws cloud
 
Training AWS: Module 9 - CloudWatch
Training AWS: Module 9 - CloudWatchTraining AWS: Module 9 - CloudWatch
Training AWS: Module 9 - CloudWatch
 
Adaptive Scaling of Microgateways on Kubernetes
Adaptive Scaling of Microgateways on KubernetesAdaptive Scaling of Microgateways on Kubernetes
Adaptive Scaling of Microgateways on Kubernetes
 
Intro to Kubernetes & GitOps Workshop
Intro to Kubernetes & GitOps WorkshopIntro to Kubernetes & GitOps Workshop
Intro to Kubernetes & GitOps Workshop
 
Jamcracker Cloud Management Platform: Control, Govern and Manage Enterprise C...
Jamcracker Cloud Management Platform: Control, Govern and Manage Enterprise C...Jamcracker Cloud Management Platform: Control, Govern and Manage Enterprise C...
Jamcracker Cloud Management Platform: Control, Govern and Manage Enterprise C...
 
Deploying WSO2 API Manager in Production-Grade Kubernetes
Deploying WSO2 API Manager in Production-Grade KubernetesDeploying WSO2 API Manager in Production-Grade Kubernetes
Deploying WSO2 API Manager in Production-Grade Kubernetes
 
Hybrid Cloud Management and Orchestration : The Complete Solution
Hybrid Cloud Management and Orchestration : The Complete SolutionHybrid Cloud Management and Orchestration : The Complete Solution
Hybrid Cloud Management and Orchestration : The Complete Solution
 
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Free GitOps Workshop (with Intro to Kubernetes & GitOps)Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
 
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdfAltinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
Altinity Webinar: Introduction to Altinity.Cloud-Platform for Real-Time Data.pdf
 
AWS Bulgaria: Re:invent 2017 Recap
AWS Bulgaria: Re:invent 2017 RecapAWS Bulgaria: Re:invent 2017 Recap
AWS Bulgaria: Re:invent 2017 Recap
 
Accelerate Your Development: CI/CD using AWS and Serverless
Accelerate Your Development: CI/CD using AWS and ServerlessAccelerate Your Development: CI/CD using AWS and Serverless
Accelerate Your Development: CI/CD using AWS and Serverless
 
ENT203 Monitoring and Autoscaling, a Match Made in Heaven
ENT203 Monitoring and Autoscaling, a Match Made in HeavenENT203 Monitoring and Autoscaling, a Match Made in Heaven
ENT203 Monitoring and Autoscaling, a Match Made in Heaven
 
Scaling Monitoring At Databricks From Prometheus to M3
Scaling Monitoring At Databricks From Prometheus to M3Scaling Monitoring At Databricks From Prometheus to M3
Scaling Monitoring At Databricks From Prometheus to M3
 
Data Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixData Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFix
 
Autoscaling Kubernetes
Autoscaling KubernetesAutoscaling Kubernetes
Autoscaling Kubernetes
 
Get Ready to Become Google Associate Cloud Engineer
Get Ready to Become Google Associate Cloud EngineerGet Ready to Become Google Associate Cloud Engineer
Get Ready to Become Google Associate Cloud Engineer
 
Kks sre book_ch10
Kks sre book_ch10Kks sre book_ch10
Kks sre book_ch10
 
Monitoring kubernetes across data center and cloud
Monitoring kubernetes across data center and cloudMonitoring kubernetes across data center and cloud
Monitoring kubernetes across data center and cloud
 
Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017
Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017
Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017
 

Mais de Felipe

Mais de Felipe (15)

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

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

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