SlideShare una empresa de Scribd logo
1 de 33
Descargar para leer sin conexión
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Charly Fontaine - Software Engineer | Datadog
- Monitoring in Motion -
Best Practices for Monitoring Amazon ECS
Containers Launched with AWS Fargate
1
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Today’s story
2
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
[charly@datadoghq.com]
Name: Charly Fontaine
Role: Software Engineer
Interests:
* Containerized Infrastructures
* Monitoring all the things
* Motorcycles & bouldering
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
• SaaS based infrastructure and app monitoring
• Open Source Agent
• Logs
• Application Performance Monitoring
• Time series data (metrics and events)
• Processing trillions of data points per day
• Intelligent Alerting
Datadog Overview
4
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
What is Fargate
• Easy way to deploy your containers on AWS.
• Use containers as a fundamental compute primitive.
• No need to manage the underlying instances.
5
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Why use Fargate
6
• Speed up deployments.
• Focus on building apps not maintaining infrastructure.
• Optimisation of costs.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
How Fargate works
• Two launch types: Amazon EC2 or Fargate.
• Task based approach.
• Amazon ECS agent starts and manages tasks.
7
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Monitoring
8
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
What is monitoring
9
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Why monitoring
10
11
12
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Why monitoring ?
Collecting data is cheap;
not having it when you
need it can be expensive
13
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Why monitoring ?
14
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 15
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
How Monitoring ?
$ docker run -d --name dd-agent 
-v /var/run/docker.sock:/var/run/docker.sock:ro 
-v /proc/:/host/proc/:ro 
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro 
-e DD_API_KEY=<secret> 
datadog/agent:latest
16
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
How monitoring ?
$ cat /sys/fs/cgroup/cpuacct/docker/$CONTAINER_ID/cpuacct.stat
> user 2451 # time spent running processes since boot
> system 966 # time spent executing system calls since boot
$ cat /sys/fs/cgroup/cpu/docker/$CONTAINER_ID/cpu.stat
> nr_periods 565 # Number of enforcement intervals that have
elapsed
> nr_throttled 559 # Number of times the group has been throttled
> throttled_time 12119585961 # Total time that members of the
group were throttled (12.12 seconds)
17
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 18
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
The Fargate Approach
19
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
$ AWS console
20
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
$ aws ecs describe-tasks —tasks taskarn
21
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
No Host.
No cgroups.
No procs.
No socket.
22
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 23
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
$ curl http://169.254.170.2/v2/stats | jq ‘.'
* {
"277d764bde83262ea6eb32cde8cfe85e2378f4357d8c61137cf54b8621e9e922": {
"read": "2018-03-16T14:57:13.601159546Z",
"preread": "2018-03-16T14:57:12.613128625Z",
"num_procs": 0,
"pids_stats": {},
"network": {},
"memory_stats": {
"stats": {
"cache": 126029824,
"mapped_file": 53489664,
[…]
}
24
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
$ curl http://169.254.170.2/v2/metadata | jq ‘.'
* "Cluster": "charly-aws-summit",
* "TaskARN": "arn:aws:ecs:us-east-1:172597598159:task/3d00ef0b-9ff3-XXX",
* "DockerName": "ecs-charly-aws-summit-2-redis-b2",
* "Image": "redis:latest",
* "Labels": {
"com.amazonaws.ecs.cluster": "charly-aws-summit",
[...]
"com.amazonaws.ecs.task-definition-version": “2",
"com.datadoghq.ad.check_names": "["redisdb"]",
"com.datadoghq.ad.init_configs": "[{}]",
"com.datadoghq.ad.instances": "[{"host": "%%host%%", "port": "6379"}]"
}
25
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Demo
26
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Demo slide.
Not shown. For
dry run purposes
Exec in container
Curl /metadata
/stats
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Autodiscovery
Demo slide.
Not shown. For
dry run purposes
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Launching a Fargate
Task from the
console.
Demo slide.
Not shown. For
dry run purposes
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Demo slide.
Not shown. For
dry run purposes
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Changing a paradigm:
1 task is one workload
1 task is one mission
1 task is one set of actions and processes
31
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
There are no such things as challenges.
Just new approaches.
32
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 33

Más contenido relacionado

La actualidad más candente

Create a Serverless Web Event Pipeline (ADT301) - AWS re:Invent 2018
Create a Serverless Web Event Pipeline (ADT301) - AWS re:Invent 2018Create a Serverless Web Event Pipeline (ADT301) - AWS re:Invent 2018
Create a Serverless Web Event Pipeline (ADT301) - AWS re:Invent 2018Amazon Web Services
 
SRV209 Monitor Cross-Account and Cross-Region Compliance Status with AWS Config
SRV209 Monitor Cross-Account and Cross-Region Compliance Status with AWS ConfigSRV209 Monitor Cross-Account and Cross-Region Compliance Status with AWS Config
SRV209 Monitor Cross-Account and Cross-Region Compliance Status with AWS ConfigAmazon Web Services
 
Building Real-time Serverless Backends with GraphQL
Building Real-time Serverless Backends with GraphQLBuilding Real-time Serverless Backends with GraphQL
Building Real-time Serverless Backends with GraphQLAmazon Web Services
 
Amazon VPC: Security at the Speed Of Light (NET313) - AWS re:Invent 2018
Amazon VPC: Security at the Speed Of Light (NET313) - AWS re:Invent 2018Amazon VPC: Security at the Speed Of Light (NET313) - AWS re:Invent 2018
Amazon VPC: Security at the Speed Of Light (NET313) - AWS re:Invent 2018Amazon Web Services
 
Securing Machine Learning Deployments for the Enterprise (SEC369-R1) - AWS re...
Securing Machine Learning Deployments for the Enterprise (SEC369-R1) - AWS re...Securing Machine Learning Deployments for the Enterprise (SEC369-R1) - AWS re...
Securing Machine Learning Deployments for the Enterprise (SEC369-R1) - AWS re...Amazon Web Services
 
IoT Building Blocks_ From Edge Devices to Analytics in the Cloud
IoT Building Blocks_ From Edge Devices to Analytics in the Cloud IoT Building Blocks_ From Edge Devices to Analytics in the Cloud
IoT Building Blocks_ From Edge Devices to Analytics in the Cloud Amazon Web Services
 
Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...
Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...
Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...Amazon Web Services
 
Best Practices for Securing Serverless Applications (SEC362-R1) - AWS re:Inve...
Best Practices for Securing Serverless Applications (SEC362-R1) - AWS re:Inve...Best Practices for Securing Serverless Applications (SEC362-R1) - AWS re:Inve...
Best Practices for Securing Serverless Applications (SEC362-R1) - AWS re:Inve...Amazon Web Services
 
Advanced Deployment Best Practices with AWS CodeDeploy (DEV404-R2) - AWS re:I...
Advanced Deployment Best Practices with AWS CodeDeploy (DEV404-R2) - AWS re:I...Advanced Deployment Best Practices with AWS CodeDeploy (DEV404-R2) - AWS re:I...
Advanced Deployment Best Practices with AWS CodeDeploy (DEV404-R2) - AWS re:I...Amazon Web Services
 
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...Amazon Web Services
 
Optimizing Costs as You Scale on AWS (ENT302) - AWS re:Invent 2018
Optimizing Costs as You Scale on AWS (ENT302) - AWS re:Invent 2018Optimizing Costs as You Scale on AWS (ENT302) - AWS re:Invent 2018
Optimizing Costs as You Scale on AWS (ENT302) - AWS re:Invent 2018Amazon Web Services
 
How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...
How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...
How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...Amazon Web Services
 
Implementing Multi-Region AWS IoT, ft. Analog Devices (IOT401) - AWS re:Inven...
Implementing Multi-Region AWS IoT, ft. Analog Devices (IOT401) - AWS re:Inven...Implementing Multi-Region AWS IoT, ft. Analog Devices (IOT401) - AWS re:Inven...
Implementing Multi-Region AWS IoT, ft. Analog Devices (IOT401) - AWS re:Inven...Amazon Web Services
 
How Rovio Uses Amazon CloudFront for Secure API Acceleration (CTD315) - AWS r...
How Rovio Uses Amazon CloudFront for Secure API Acceleration (CTD315) - AWS r...How Rovio Uses Amazon CloudFront for Secure API Acceleration (CTD315) - AWS r...
How Rovio Uses Amazon CloudFront for Secure API Acceleration (CTD315) - AWS r...Amazon Web Services
 
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...Amazon Web Services
 
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...Amazon Web Services
 
Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...
Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...
Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...Amazon Web Services
 
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018Amazon Web Services
 
Policy Verification and Enforcement at Scale with AWS (SEC320) - AWS re:Inven...
Policy Verification and Enforcement at Scale with AWS (SEC320) - AWS re:Inven...Policy Verification and Enforcement at Scale with AWS (SEC320) - AWS re:Inven...
Policy Verification and Enforcement at Scale with AWS (SEC320) - AWS re:Inven...Amazon Web Services
 
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018Amazon Web Services
 

La actualidad más candente (20)

Create a Serverless Web Event Pipeline (ADT301) - AWS re:Invent 2018
Create a Serverless Web Event Pipeline (ADT301) - AWS re:Invent 2018Create a Serverless Web Event Pipeline (ADT301) - AWS re:Invent 2018
Create a Serverless Web Event Pipeline (ADT301) - AWS re:Invent 2018
 
SRV209 Monitor Cross-Account and Cross-Region Compliance Status with AWS Config
SRV209 Monitor Cross-Account and Cross-Region Compliance Status with AWS ConfigSRV209 Monitor Cross-Account and Cross-Region Compliance Status with AWS Config
SRV209 Monitor Cross-Account and Cross-Region Compliance Status with AWS Config
 
Building Real-time Serverless Backends with GraphQL
Building Real-time Serverless Backends with GraphQLBuilding Real-time Serverless Backends with GraphQL
Building Real-time Serverless Backends with GraphQL
 
Amazon VPC: Security at the Speed Of Light (NET313) - AWS re:Invent 2018
Amazon VPC: Security at the Speed Of Light (NET313) - AWS re:Invent 2018Amazon VPC: Security at the Speed Of Light (NET313) - AWS re:Invent 2018
Amazon VPC: Security at the Speed Of Light (NET313) - AWS re:Invent 2018
 
Securing Machine Learning Deployments for the Enterprise (SEC369-R1) - AWS re...
Securing Machine Learning Deployments for the Enterprise (SEC369-R1) - AWS re...Securing Machine Learning Deployments for the Enterprise (SEC369-R1) - AWS re...
Securing Machine Learning Deployments for the Enterprise (SEC369-R1) - AWS re...
 
IoT Building Blocks_ From Edge Devices to Analytics in the Cloud
IoT Building Blocks_ From Edge Devices to Analytics in the Cloud IoT Building Blocks_ From Edge Devices to Analytics in the Cloud
IoT Building Blocks_ From Edge Devices to Analytics in the Cloud
 
Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...
Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...
Best Practices for Safe Deployments on AWS Lambda and Amazon API Gateway (SRV...
 
Best Practices for Securing Serverless Applications (SEC362-R1) - AWS re:Inve...
Best Practices for Securing Serverless Applications (SEC362-R1) - AWS re:Inve...Best Practices for Securing Serverless Applications (SEC362-R1) - AWS re:Inve...
Best Practices for Securing Serverless Applications (SEC362-R1) - AWS re:Inve...
 
Advanced Deployment Best Practices with AWS CodeDeploy (DEV404-R2) - AWS re:I...
Advanced Deployment Best Practices with AWS CodeDeploy (DEV404-R2) - AWS re:I...Advanced Deployment Best Practices with AWS CodeDeploy (DEV404-R2) - AWS re:I...
Advanced Deployment Best Practices with AWS CodeDeploy (DEV404-R2) - AWS re:I...
 
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
 
Optimizing Costs as You Scale on AWS (ENT302) - AWS re:Invent 2018
Optimizing Costs as You Scale on AWS (ENT302) - AWS re:Invent 2018Optimizing Costs as You Scale on AWS (ENT302) - AWS re:Invent 2018
Optimizing Costs as You Scale on AWS (ENT302) - AWS re:Invent 2018
 
How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...
How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...
How Avatars & AR Are Driving Innovation: Lessons from Electronic Caregiver (A...
 
Implementing Multi-Region AWS IoT, ft. Analog Devices (IOT401) - AWS re:Inven...
Implementing Multi-Region AWS IoT, ft. Analog Devices (IOT401) - AWS re:Inven...Implementing Multi-Region AWS IoT, ft. Analog Devices (IOT401) - AWS re:Inven...
Implementing Multi-Region AWS IoT, ft. Analog Devices (IOT401) - AWS re:Inven...
 
How Rovio Uses Amazon CloudFront for Secure API Acceleration (CTD315) - AWS r...
How Rovio Uses Amazon CloudFront for Secure API Acceleration (CTD315) - AWS r...How Rovio Uses Amazon CloudFront for Secure API Acceleration (CTD315) - AWS r...
How Rovio Uses Amazon CloudFront for Secure API Acceleration (CTD315) - AWS r...
 
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
CI/CD for Serverless and Containerized Applications (DEV309-R1) - AWS re:Inve...
 
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...
Real-Time Web Analytics with Amazon Kinesis Data Analytics (ADT401) - AWS re:...
 
Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...
Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...
Earn Your DevOps Black Belt: Deployment Scenarios with AWS CloudFormation (DE...
 
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
Operationalizing Microsoft Workloads (WIN320) - AWS re:Invent 2018
 
Policy Verification and Enforcement at Scale with AWS (SEC320) - AWS re:Inven...
Policy Verification and Enforcement at Scale with AWS (SEC320) - AWS re:Inven...Policy Verification and Enforcement at Scale with AWS (SEC320) - AWS re:Inven...
Policy Verification and Enforcement at Scale with AWS (SEC320) - AWS re:Inven...
 
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
 

Similar a DEM07 Best Practices for Monitoring Amazon ECS Containers Launched with Fargate

Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018Amazon Web Services
 
Supercharge GuardDuty with Partners: Threat Detection and Response at Scale (...
Supercharge GuardDuty with Partners: Threat Detection and Response at Scale (...Supercharge GuardDuty with Partners: Threat Detection and Response at Scale (...
Supercharge GuardDuty with Partners: Threat Detection and Response at Scale (...Amazon Web Services
 
Building Microservices with the 12 Factor App Pattern on AWS - Tony Pujals
Building Microservices with the 12 Factor App Pattern on AWS - Tony PujalsBuilding Microservices with the 12 Factor App Pattern on AWS - Tony Pujals
Building Microservices with the 12 Factor App Pattern on AWS - Tony PujalsAmazon Web Services
 
QCon 2018 | Gimel | PayPal's Analytic Platform
QCon 2018 | Gimel | PayPal's Analytic PlatformQCon 2018 | Gimel | PayPal's Analytic Platform
QCon 2018 | Gimel | PayPal's Analytic PlatformDeepak Chandramouli
 
Monitoring Serverless Applications (SRV303-S) - AWS re:Invent 2018
Monitoring Serverless Applications (SRV303-S) - AWS re:Invent 2018Monitoring Serverless Applications (SRV303-S) - AWS re:Invent 2018
Monitoring Serverless Applications (SRV303-S) - AWS re:Invent 2018Amazon Web Services
 
How to Perform Forensics on AWS Using Serverless Infrastructure (SEC416-R1) -...
How to Perform Forensics on AWS Using Serverless Infrastructure (SEC416-R1) -...How to Perform Forensics on AWS Using Serverless Infrastructure (SEC416-R1) -...
How to Perform Forensics on AWS Using Serverless Infrastructure (SEC416-R1) -...Amazon Web Services
 
Gimel at Dataworks Summit San Jose 2018
Gimel at Dataworks Summit San Jose 2018Gimel at Dataworks Summit San Jose 2018
Gimel at Dataworks Summit San Jose 2018Romit Mehta
 
Dataworks | 2018-06-20 | Gimel data platform
Dataworks | 2018-06-20 | Gimel data platformDataworks | 2018-06-20 | Gimel data platform
Dataworks | 2018-06-20 | Gimel data platformDeepak Chandramouli
 
Proven Methodologies for Accelerating Your Cloud Journey (ENT308-S) - AWS re:...
Proven Methodologies for Accelerating Your Cloud Journey (ENT308-S) - AWS re:...Proven Methodologies for Accelerating Your Cloud Journey (ENT308-S) - AWS re:...
Proven Methodologies for Accelerating Your Cloud Journey (ENT308-S) - AWS re:...Amazon Web Services
 
The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...
The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...
The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...Amazon Web Services
 
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...Amazon Web Services
 
Building IoT Analytics (IOT327-R1) - AWS re:Invent 2018
Building IoT Analytics (IOT327-R1) - AWS re:Invent 2018Building IoT Analytics (IOT327-R1) - AWS re:Invent 2018
Building IoT Analytics (IOT327-R1) - AWS re:Invent 2018Amazon Web Services
 
How Trek10 Uses Datadog's Distributed Tracing to Improve AWS Lambda Projects ...
How Trek10 Uses Datadog's Distributed Tracing to Improve AWS Lambda Projects ...How Trek10 Uses Datadog's Distributed Tracing to Improve AWS Lambda Projects ...
How Trek10 Uses Datadog's Distributed Tracing to Improve AWS Lambda Projects ...Amazon Web Services
 
Building Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWSBuilding Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWSAmazon Web Services
 
Building Microservices with the Twelve Factor App Pattern on AWS
Building Microservices with the Twelve Factor App Pattern on AWSBuilding Microservices with the Twelve Factor App Pattern on AWS
Building Microservices with the Twelve Factor App Pattern on AWSAmazon Web Services
 
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...Amazon Web Services
 
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018Amazon Web Services
 
IoT Building Blocks From Edge Devices to Analytics in the Cloud
IoT Building Blocks From Edge Devices to Analytics in the CloudIoT Building Blocks From Edge Devices to Analytics in the Cloud
IoT Building Blocks From Edge Devices to Analytics in the CloudAmazon Web Services
 
AWS Lambda Powertools walkthrough.pdf
AWS Lambda Powertools walkthrough.pdfAWS Lambda Powertools walkthrough.pdf
AWS Lambda Powertools walkthrough.pdfHeitor Lessa
 

Similar a DEM07 Best Practices for Monitoring Amazon ECS Containers Launched with Fargate (20)

Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
 
Supercharge GuardDuty with Partners: Threat Detection and Response at Scale (...
Supercharge GuardDuty with Partners: Threat Detection and Response at Scale (...Supercharge GuardDuty with Partners: Threat Detection and Response at Scale (...
Supercharge GuardDuty with Partners: Threat Detection and Response at Scale (...
 
Building Microservices with the 12 Factor App Pattern on AWS - Tony Pujals
Building Microservices with the 12 Factor App Pattern on AWS - Tony PujalsBuilding Microservices with the 12 Factor App Pattern on AWS - Tony Pujals
Building Microservices with the 12 Factor App Pattern on AWS - Tony Pujals
 
QCon 2018 | Gimel | PayPal's Analytic Platform
QCon 2018 | Gimel | PayPal's Analytic PlatformQCon 2018 | Gimel | PayPal's Analytic Platform
QCon 2018 | Gimel | PayPal's Analytic Platform
 
Monitoring Serverless Applications (SRV303-S) - AWS re:Invent 2018
Monitoring Serverless Applications (SRV303-S) - AWS re:Invent 2018Monitoring Serverless Applications (SRV303-S) - AWS re:Invent 2018
Monitoring Serverless Applications (SRV303-S) - AWS re:Invent 2018
 
How to Perform Forensics on AWS Using Serverless Infrastructure (SEC416-R1) -...
How to Perform Forensics on AWS Using Serverless Infrastructure (SEC416-R1) -...How to Perform Forensics on AWS Using Serverless Infrastructure (SEC416-R1) -...
How to Perform Forensics on AWS Using Serverless Infrastructure (SEC416-R1) -...
 
Gimel at Dataworks Summit San Jose 2018
Gimel at Dataworks Summit San Jose 2018Gimel at Dataworks Summit San Jose 2018
Gimel at Dataworks Summit San Jose 2018
 
Dataworks | 2018-06-20 | Gimel data platform
Dataworks | 2018-06-20 | Gimel data platformDataworks | 2018-06-20 | Gimel data platform
Dataworks | 2018-06-20 | Gimel data platform
 
Proven Methodologies for Accelerating Your Cloud Journey (ENT308-S) - AWS re:...
Proven Methodologies for Accelerating Your Cloud Journey (ENT308-S) - AWS re:...Proven Methodologies for Accelerating Your Cloud Journey (ENT308-S) - AWS re:...
Proven Methodologies for Accelerating Your Cloud Journey (ENT308-S) - AWS re:...
 
The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...
The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...
The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...
 
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
 
Building IoT Analytics (IOT327-R1) - AWS re:Invent 2018
Building IoT Analytics (IOT327-R1) - AWS re:Invent 2018Building IoT Analytics (IOT327-R1) - AWS re:Invent 2018
Building IoT Analytics (IOT327-R1) - AWS re:Invent 2018
 
How Trek10 Uses Datadog's Distributed Tracing to Improve AWS Lambda Projects ...
How Trek10 Uses Datadog's Distributed Tracing to Improve AWS Lambda Projects ...How Trek10 Uses Datadog's Distributed Tracing to Improve AWS Lambda Projects ...
How Trek10 Uses Datadog's Distributed Tracing to Improve AWS Lambda Projects ...
 
Building Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWSBuilding Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWS
 
Building Microservices with the Twelve Factor App Pattern on AWS
Building Microservices with the Twelve Factor App Pattern on AWSBuilding Microservices with the Twelve Factor App Pattern on AWS
Building Microservices with the Twelve Factor App Pattern on AWS
 
An ops discovery of serverless
An ops discovery of serverlessAn ops discovery of serverless
An ops discovery of serverless
 
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
 
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
Day Two Operations of Kubernetes on AWS (GPSTEC309) - AWS re:Invent 2018
 
IoT Building Blocks From Edge Devices to Analytics in the Cloud
IoT Building Blocks From Edge Devices to Analytics in the CloudIoT Building Blocks From Edge Devices to Analytics in the Cloud
IoT Building Blocks From Edge Devices to Analytics in the Cloud
 
AWS Lambda Powertools walkthrough.pdf
AWS Lambda Powertools walkthrough.pdfAWS Lambda Powertools walkthrough.pdf
AWS Lambda Powertools walkthrough.pdf
 

Más de Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

Más de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

DEM07 Best Practices for Monitoring Amazon ECS Containers Launched with Fargate

  • 1. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Charly Fontaine - Software Engineer | Datadog - Monitoring in Motion - Best Practices for Monitoring Amazon ECS Containers Launched with AWS Fargate 1
  • 2. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Today’s story 2
  • 3. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. [charly@datadoghq.com] Name: Charly Fontaine Role: Software Engineer Interests: * Containerized Infrastructures * Monitoring all the things * Motorcycles & bouldering
  • 4. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. • SaaS based infrastructure and app monitoring • Open Source Agent • Logs • Application Performance Monitoring • Time series data (metrics and events) • Processing trillions of data points per day • Intelligent Alerting Datadog Overview 4
  • 5. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. What is Fargate • Easy way to deploy your containers on AWS. • Use containers as a fundamental compute primitive. • No need to manage the underlying instances. 5
  • 6. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Why use Fargate 6 • Speed up deployments. • Focus on building apps not maintaining infrastructure. • Optimisation of costs.
  • 7. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. How Fargate works • Two launch types: Amazon EC2 or Fargate. • Task based approach. • Amazon ECS agent starts and manages tasks. 7
  • 8. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Monitoring 8
  • 9. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. What is monitoring 9
  • 10. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Why monitoring 10
  • 11. 11
  • 12. 12
  • 13. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Why monitoring ? Collecting data is cheap; not having it when you need it can be expensive 13
  • 14. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Why monitoring ? 14
  • 15. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 15
  • 16. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. How Monitoring ? $ docker run -d --name dd-agent -v /var/run/docker.sock:/var/run/docker.sock:ro -v /proc/:/host/proc/:ro -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro -e DD_API_KEY=<secret> datadog/agent:latest 16
  • 17. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. How monitoring ? $ cat /sys/fs/cgroup/cpuacct/docker/$CONTAINER_ID/cpuacct.stat > user 2451 # time spent running processes since boot > system 966 # time spent executing system calls since boot $ cat /sys/fs/cgroup/cpu/docker/$CONTAINER_ID/cpu.stat > nr_periods 565 # Number of enforcement intervals that have elapsed > nr_throttled 559 # Number of times the group has been throttled > throttled_time 12119585961 # Total time that members of the group were throttled (12.12 seconds) 17
  • 18. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 18
  • 19. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. The Fargate Approach 19
  • 20. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. $ AWS console 20
  • 21. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. $ aws ecs describe-tasks —tasks taskarn 21
  • 22. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. No Host. No cgroups. No procs. No socket. 22
  • 23. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 23
  • 24. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. $ curl http://169.254.170.2/v2/stats | jq ‘.' * { "277d764bde83262ea6eb32cde8cfe85e2378f4357d8c61137cf54b8621e9e922": { "read": "2018-03-16T14:57:13.601159546Z", "preread": "2018-03-16T14:57:12.613128625Z", "num_procs": 0, "pids_stats": {}, "network": {}, "memory_stats": { "stats": { "cache": 126029824, "mapped_file": 53489664, […] } 24
  • 25. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. $ curl http://169.254.170.2/v2/metadata | jq ‘.' * "Cluster": "charly-aws-summit", * "TaskARN": "arn:aws:ecs:us-east-1:172597598159:task/3d00ef0b-9ff3-XXX", * "DockerName": "ecs-charly-aws-summit-2-redis-b2", * "Image": "redis:latest", * "Labels": { "com.amazonaws.ecs.cluster": "charly-aws-summit", [...] "com.amazonaws.ecs.task-definition-version": “2", "com.datadoghq.ad.check_names": "["redisdb"]", "com.datadoghq.ad.init_configs": "[{}]", "com.datadoghq.ad.instances": "[{"host": "%%host%%", "port": "6379"}]" } 25
  • 26. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Demo 26
  • 27. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Demo slide. Not shown. For dry run purposes Exec in container Curl /metadata /stats
  • 28. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Autodiscovery Demo slide. Not shown. For dry run purposes
  • 29. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Launching a Fargate Task from the console. Demo slide. Not shown. For dry run purposes
  • 30. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Demo slide. Not shown. For dry run purposes
  • 31. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Changing a paradigm: 1 task is one workload 1 task is one mission 1 task is one set of actions and processes 31
  • 32. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. There are no such things as challenges. Just new approaches. 32
  • 33. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 33