SlideShare uma empresa Scribd logo
1 de 24
Baixar para ler offline
Monitoring Containers at New Relic
Sean
Kane
Lead Site Reliability Engineer
New Relic
• Docker Daemon Logs
• Jun 19 09:00:03 docker-20 docker: time="2016-06-19T09:00:03.938763022-07:00"
level=error msg="HTTP Error" err="no such id: fbfe…cdca5607590e5” statusCode=404
• Docker Container (Application) Logs
• 2016-06-18 23:15:14,265{PST} [KafkaProducerPoolService STARTING] INFO
c.n.d.n.p.KafkaProducerPoolService - added producer 1
• Docker Events
• 2016-06-19T16:40:43.108589658Z container die 2f457…040f (exitCode=2,
image=progrium/stress, name=oom-2)
• Docker Statistics
• CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
• 24b03e00057b 54.76% 1.021 GB / 1.93 GB 52.90% 648 B / 648 B 150.3 MB / 196.5 MB 0
Docker - Data of Interest
Heka
Mozilla’s Open Source
Message Processor
https://github.com/mozilla-services/heka
[DockerEventInput]
type = "DockerEventInput"
[DockerStatsInput]
endpoint = "unix:///var/run/docker.sock"
fields_from_env = ["SERVICE_ENV", "SERVICE_NAME"]
decoder = "JsonDockerStatsDecoder"
ticker_interval = 1
Inputs - Docker Statistics & Events
[DockerLogInput]
fields_from_env = ["SERVICE_ENV", "SERVICE_NAME"]
since_path = "/var/log/heka-since"
[DockerDaemonLogInput]
address = "127.0.0.1:50001"
type = "UdpInput"
decoder = "LogfmtDecoder"
Inputs - Docker Daemon/Container Logs
template(name="ls_json"
type="list"
option.json="on") {
constant(value="{")
constant(value=""timestamp":"") property(name="timereported" dateFormat="rfc3339")
constant(value="","message":"") property(name="msg")
constant(value="","host":"") property(name="hostname")
constant(value="","severity":"") property(name="syslogseverity-text")
constant(value="","facility":"") property(name="syslogfacility-text")
constant(value="","program":"") property(name="programname")
constant(value="","pid":"") property(name="procid")
constant(value=""}n")
}
if $programname == 'docker' then @127.0.0.1:50001;ls_json
& stop
rsyslog - Docker Daemon Logs
[LogfmtDecoder]
filename = "/usr/share/heka/lua_plugins/logfmt_decoder.lua"
script_type = "lua"
type = "SandboxDecoder"
Decoders/Filters - Docker Daemon Logs
[JsonDockerStatsDecoder]
filename = "/usr/share/heka/lua_plugins/docker_stats_filter.lua"
type = "SandboxDecoder"
[JsonDockerStatsDecoder.config]
payload_keep = false
type = "DockerStats"
Decoders/Filters - Docker Statistics
[counter_output]
type = "LogOutput"
message_matcher = "TRUE"
encoder = "RstEncoder"
[counter_file]
type = "FileOutput"
message_matcher = "TRUE"
path = "/var/log/heka-debug.log"
perm = "666"
flush_count = 100
flush_operator = "OR"
encoder = “RstEncoder"
[RstEncoder] # Restructured Text
Encoder
Encoders/Outputs - Debugging
Results - Debugging
:Timestamp: 2016-06-02 00:35:18.950140231 +0000 UTC
:Type: DockerEvent
:Hostname: demo.example.com
:Pid: 0
:Uuid: 92d64bfc-f040-4913-9b0b-171d19dd5bc7
:Logger: fffdde973eb1264b389eb4cee33d624c6b03341790cf951a3d724a4e032b0269
:Payload: id:fffdd…b0269 status:destroy from:eeacms/phoronix-test-suite time:1464827718
:EnvVersion:
:Severity: 7
:Fields:
| name:"ID" type:string value:”fffdde973eb1264b389eb4c…90cf951a3d724a4e032b0269”
| name:"Status" type:string value:"destroy"
| name:"From" type:string value:"eeacms/phoronix-test-suite"
| name:"Time" type:integer value:1464827718 representation:"ts"
[InsightsDockerStatsOutput]
filename = "/usr/share/heka/lua_plugins/insights_output.lua"
message_matcher = "Type == 'DockerStats'"
module_directory = "/usr/share/heka/lua_modules"
script_type = "lua"
ticker_interval = 10
type = "SandboxOutput"
[InsightsDockerStatsOutput.config]
default_event_source = "DockerStats"
default_event_type = "DockerStats"
default_event_version = 2
event_post_count_max = 30
event_url = “https://insights-collector.newrelic.com/v1/accounts/######/events”
insert_key = "REDACTED"
Encoders/Outputs - Insights
Insights
New Relic’s
Analytics Engine
https://newrelic.com/insights
# curl -H "Accept: application/json" -H "X-Query-Key: REDACTED" “https://insights-api.newrelic.com/v1/
accounts/#####/query?nrql=SELECT%20%2a%20FROM%20DockerEvent%20WHERE%20Status%20%3D
%20%27destroy%27%20OR%20Status%20%3D%20%27oom%27%20SINCE%201%20HOUR%20AGO” | jq
{
"results": [
{
"events": [
{
"Status": "destroy",
"severity": 7,
"hostname": "demo.example.com",
"payload": “id:347d59b07f105f3…97d93145a27 status:destroy from:f85b5b675a9e time:1465003319",
"eventVersion": 1,
"logger": "347d59b07f105f3f9a8057069d4f5e2b444ddebf2829a13fb5a5697d93145a27",
"eventSource": "DockerEvent",
"Time": 1465003319,
"ID": "347d59b07f105f3f9a8057069d4f5e2b444ddebf2829a13fb5a5697d93145a27",
"From": "f85b5b675a9e",
"type": "DockerEvent",
"timestamp": 1465003319436
}, …
Insights - API Query
Overview
• Docker Endpoints
• Heka
• https://github.com/mozilla-services/heka
• TOML - Tom's Obvious, Minimal Language
• https://github.com/toml-lang/toml
• New Relic Insights
• https://newrelic.com/insights
• New Relic Alerting
• https://blog.newrelic.com/2015/05/06/new-relic-alerts/
https://commons.wikimedia.org/
https://newrelic.com/
Image Attribution
Book: http://shop.oreilly.com/
product/0636920036142.do
More about Docker
Docker: Up and Running - Online Course
June 28 & 29, 2016
Class: http://www.oreilly.com/online-
training/docker-up-and-running.html
Thank you!
Any Questions?

Mais conteúdo relacionado

Mais procurados

Continuous integration with Docker and Ansible
Continuous integration with Docker and AnsibleContinuous integration with Docker and Ansible
Continuous integration with Docker and Ansible
Dmytro Slupytskyi
 
Thinking Inside the Container: A Continuous Delivery Story by Maxfield Stewart
Thinking Inside the Container: A Continuous Delivery Story by Maxfield Stewart Thinking Inside the Container: A Continuous Delivery Story by Maxfield Stewart
Thinking Inside the Container: A Continuous Delivery Story by Maxfield Stewart
Docker, Inc.
 

Mais procurados (20)

Docker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David LawrenceDocker Security Deep Dive by Ying Li and David Lawrence
Docker Security Deep Dive by Ying Li and David Lawrence
 
Docker for Devs - John Zaccone, IBM
Docker for Devs - John Zaccone, IBMDocker for Devs - John Zaccone, IBM
Docker for Devs - John Zaccone, IBM
 
Containerize All the Multi-Platform Things! - DockerCon Seattle 2016
Containerize All the Multi-Platform Things! - DockerCon Seattle 2016Containerize All the Multi-Platform Things! - DockerCon Seattle 2016
Containerize All the Multi-Platform Things! - DockerCon Seattle 2016
 
Docker for Mac and Windows: The Insider's Guide by Justin Cormack
Docker for Mac and Windows: The Insider's Guide by Justin CormackDocker for Mac and Windows: The Insider's Guide by Justin Cormack
Docker for Mac and Windows: The Insider's Guide by Justin Cormack
 
DockerCon US 2016 - Extending Docker With APIs, Drivers, and Plugins
DockerCon US 2016 - Extending Docker With APIs, Drivers, and PluginsDockerCon US 2016 - Extending Docker With APIs, Drivers, and Plugins
DockerCon US 2016 - Extending Docker With APIs, Drivers, and Plugins
 
Windows Server and Docker - The Internals Behind Bringing Docker and Containe...
Windows Server and Docker - The Internals Behind Bringing Docker and Containe...Windows Server and Docker - The Internals Behind Bringing Docker and Containe...
Windows Server and Docker - The Internals Behind Bringing Docker and Containe...
 
Scaling Development Environments with Docker
Scaling Development Environments with DockerScaling Development Environments with Docker
Scaling Development Environments with Docker
 
Docker for Fun and Profit
Docker for Fun and ProfitDocker for Fun and Profit
Docker for Fun and Profit
 
Docker cluster with swarm, consul, registrator and consul-template
Docker cluster with swarm, consul, registrator and consul-templateDocker cluster with swarm, consul, registrator and consul-template
Docker cluster with swarm, consul, registrator and consul-template
 
Continuous integration with Docker and Ansible
Continuous integration with Docker and AnsibleContinuous integration with Docker and Ansible
Continuous integration with Docker and Ansible
 
Docker and Windows: The State of the Union
Docker and Windows: The State of the UnionDocker and Windows: The State of the Union
Docker and Windows: The State of the Union
 
Scaling Jenkins with Kubernetes by Ami Mahloof
Scaling Jenkins with Kubernetes by Ami MahloofScaling Jenkins with Kubernetes by Ami Mahloof
Scaling Jenkins with Kubernetes by Ami Mahloof
 
DockerDay2015: Docker orchestration for developers
DockerDay2015: Docker orchestration for developersDockerDay2015: Docker orchestration for developers
DockerDay2015: Docker orchestration for developers
 
In-Cluster Continuous Testing Framework for Docker Containers
In-Cluster Continuous Testing Framework for Docker ContainersIn-Cluster Continuous Testing Framework for Docker Containers
In-Cluster Continuous Testing Framework for Docker Containers
 
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth RushgroveThe Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
The Dockerfile Explosion and the Need for Higher Level Tools by Gareth Rushgrove
 
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
 
Docker up and running
Docker up and runningDocker up and running
Docker up and running
 
Thinking Inside the Container: A Continuous Delivery Story by Maxfield Stewart
Thinking Inside the Container: A Continuous Delivery Story by Maxfield Stewart Thinking Inside the Container: A Continuous Delivery Story by Maxfield Stewart
Thinking Inside the Container: A Continuous Delivery Story by Maxfield Stewart
 
Kubernetes intro public - kubernetes meetup 4-21-2015
Kubernetes intro   public - kubernetes meetup 4-21-2015Kubernetes intro   public - kubernetes meetup 4-21-2015
Kubernetes intro public - kubernetes meetup 4-21-2015
 
SQL Sever on Docker: Database Containers 3 Ways
SQL Sever on Docker: Database Containers 3 WaysSQL Sever on Docker: Database Containers 3 Ways
SQL Sever on Docker: Database Containers 3 Ways
 

Destaque

Docker at DevTable
Docker at DevTableDocker at DevTable
Docker at DevTable
Docker, Inc.
 
Victor Vieux at Docker Paris Meetup #1
Victor Vieux at Docker Paris Meetup #1Victor Vieux at Docker Paris Meetup #1
Victor Vieux at Docker Paris Meetup #1
Docker, Inc.
 
Building Images from dockerfiles
Building Images from dockerfilesBuilding Images from dockerfiles
Building Images from dockerfiles
Docker, Inc.
 
DockerCon14 Automated Chef Cookbook Testing
DockerCon14 Automated Chef Cookbook TestingDockerCon14 Automated Chef Cookbook Testing
DockerCon14 Automated Chef Cookbook Testing
Docker, Inc.
 
Dockerfile Basics Workshop #1
Dockerfile Basics Workshop #1Dockerfile Basics Workshop #1
Dockerfile Basics Workshop #1
Docker, Inc.
 
Immutable Infrastructure with Docker and EC2
Immutable Infrastructure with Docker and EC2Immutable Infrastructure with Docker and EC2
Immutable Infrastructure with Docker and EC2
Docker, Inc.
 
LXC to Docker Via Continuous Delivery
LXC to Docker Via Continuous DeliveryLXC to Docker Via Continuous Delivery
LXC to Docker Via Continuous Delivery
Docker, Inc.
 
DockerCon14 Performance Characteristics of Traditional VMs vs. Docker Containers
DockerCon14 Performance Characteristics of Traditional VMs vs. Docker ContainersDockerCon14 Performance Characteristics of Traditional VMs vs. Docker Containers
DockerCon14 Performance Characteristics of Traditional VMs vs. Docker Containers
Docker, Inc.
 

Destaque (20)

Docker, Innovation Accelerator
Docker, Innovation AcceleratorDocker, Innovation Accelerator
Docker, Innovation Accelerator
 
Docker at DevTable
Docker at DevTableDocker at DevTable
Docker at DevTable
 
DockerCon EU 2015: Nesting Containers: Real Life Observations
DockerCon EU 2015: Nesting Containers: Real Life ObservationsDockerCon EU 2015: Nesting Containers: Real Life Observations
DockerCon EU 2015: Nesting Containers: Real Life Observations
 
Making it Easier to Contribute to Open Source Projects Using Docker Container...
Making it Easier to Contribute to Open Source Projects Using Docker Container...Making it Easier to Contribute to Open Source Projects Using Docker Container...
Making it Easier to Contribute to Open Source Projects Using Docker Container...
 
Tyrion Cannister Neural Styles by Dora Korpar and Siphan Bou
Tyrion Cannister Neural Styles by Dora Korpar and Siphan BouTyrion Cannister Neural Styles by Dora Korpar and Siphan Bou
Tyrion Cannister Neural Styles by Dora Korpar and Siphan Bou
 
DockerCon 16 - Moby's Cool Hack Session
DockerCon 16 - Moby's Cool Hack SessionDockerCon 16 - Moby's Cool Hack Session
DockerCon 16 - Moby's Cool Hack Session
 
Dockercon Swarm Updated
Dockercon Swarm UpdatedDockercon Swarm Updated
Dockercon Swarm Updated
 
Victor Vieux at Docker Paris Meetup #1
Victor Vieux at Docker Paris Meetup #1Victor Vieux at Docker Paris Meetup #1
Victor Vieux at Docker Paris Meetup #1
 
Building Images from dockerfiles
Building Images from dockerfilesBuilding Images from dockerfiles
Building Images from dockerfiles
 
DockerCon14 Automated Chef Cookbook Testing
DockerCon14 Automated Chef Cookbook TestingDockerCon14 Automated Chef Cookbook Testing
DockerCon14 Automated Chef Cookbook Testing
 
Why should I care about stateful containers?
Why should I care about stateful containers?Why should I care about stateful containers?
Why should I care about stateful containers?
 
Dockerfile Basics Workshop #1
Dockerfile Basics Workshop #1Dockerfile Basics Workshop #1
Dockerfile Basics Workshop #1
 
Everything You Need to Know About Docker and Storage by Ryan Wallner, ClusterHQ
Everything You Need to Know About Docker and Storage by Ryan Wallner, ClusterHQ Everything You Need to Know About Docker and Storage by Ryan Wallner, ClusterHQ
Everything You Need to Know About Docker and Storage by Ryan Wallner, ClusterHQ
 
Immutable Infrastructure with Docker and EC2
Immutable Infrastructure with Docker and EC2Immutable Infrastructure with Docker and EC2
Immutable Infrastructure with Docker and EC2
 
LXC to Docker Via Continuous Delivery
LXC to Docker Via Continuous DeliveryLXC to Docker Via Continuous Delivery
LXC to Docker Via Continuous Delivery
 
On-the-Fly Containerization of Enterprise Java & .NET Apps by Amjad Afanah
On-the-Fly Containerization of Enterprise Java & .NET Apps by Amjad AfanahOn-the-Fly Containerization of Enterprise Java & .NET Apps by Amjad Afanah
On-the-Fly Containerization of Enterprise Java & .NET Apps by Amjad Afanah
 
Docker 1.11 @ Docker SF Meetup
Docker 1.11 @ Docker SF MeetupDocker 1.11 @ Docker SF Meetup
Docker 1.11 @ Docker SF Meetup
 
DockerCon14 Performance Characteristics of Traditional VMs vs. Docker Containers
DockerCon14 Performance Characteristics of Traditional VMs vs. Docker ContainersDockerCon14 Performance Characteristics of Traditional VMs vs. Docker Containers
DockerCon14 Performance Characteristics of Traditional VMs vs. Docker Containers
 
DockerCon EU 2015: Sparebank; a journey towards Docker
DockerCon EU 2015: Sparebank; a journey towards DockerDockerCon EU 2015: Sparebank; a journey towards Docker
DockerCon EU 2015: Sparebank; a journey towards Docker
 
DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...
DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...
DockerCon EU 2015: Finding a Theory of the Universe with Docker and Volunteer...
 

Semelhante a Monitoring Containers at New Relic by Sean Kane

ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale
Subbu Allamaraju
 

Semelhante a Monitoring Containers at New Relic by Sean Kane (20)

Monitoring Docker with ELK
Monitoring Docker with ELKMonitoring Docker with ELK
Monitoring Docker with ELK
 
Machine Learning and Logging for Monitoring Microservices
Machine Learning and Logging for Monitoring Microservices Machine Learning and Logging for Monitoring Microservices
Machine Learning and Logging for Monitoring Microservices
 
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack
 
Modern Linux Tracing Landscape
Modern Linux Tracing LandscapeModern Linux Tracing Landscape
Modern Linux Tracing Landscape
 
Elk for applications on k8s
Elk for applications on k8sElk for applications on k8s
Elk for applications on k8s
 
Cloud Foundry Monitoring How-To: Collecting Metrics and Logs
Cloud Foundry Monitoring How-To: Collecting Metrics and LogsCloud Foundry Monitoring How-To: Collecting Metrics and Logs
Cloud Foundry Monitoring How-To: Collecting Metrics and Logs
 
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak   CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak
CONFidence 2015: DTrace + OSX = Fun - Andrzej Dyjak
 
Docker Monitoring Webinar
Docker Monitoring  WebinarDocker Monitoring  Webinar
Docker Monitoring Webinar
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
 
ELK stack at weibo.com
ELK stack at weibo.comELK stack at weibo.com
ELK stack at weibo.com
 
Best Practices in Handling Performance Issues
Best Practices in Handling Performance IssuesBest Practices in Handling Performance Issues
Best Practices in Handling Performance Issues
 
Time Series Database and Tick Stack
Time Series Database and Tick StackTime Series Database and Tick Stack
Time Series Database and Tick Stack
 
TIAD 2016 : Real-Time Data Processing Pipeline & Visualization with Docker, S...
TIAD 2016 : Real-Time Data Processing Pipeline & Visualization with Docker, S...TIAD 2016 : Real-Time Data Processing Pipeline & Visualization with Docker, S...
TIAD 2016 : Real-Time Data Processing Pipeline & Visualization with Docker, S...
 
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka ...
 
16 ARTIFACTS TO CAPTURE WHEN YOUR CONTAINER APPLICATION IS IN TROUBLE
16 ARTIFACTS TO CAPTURE WHEN YOUR CONTAINER APPLICATION IS IN TROUBLE16 ARTIFACTS TO CAPTURE WHEN YOUR CONTAINER APPLICATION IS IN TROUBLE
16 ARTIFACTS TO CAPTURE WHEN YOUR CONTAINER APPLICATION IS IN TROUBLE
 
ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale ql.io: Consuming HTTP at Scale
ql.io: Consuming HTTP at Scale
 
(Fios#02) 2. elk 포렌식 분석
(Fios#02) 2. elk 포렌식 분석(Fios#02) 2. elk 포렌식 분석
(Fios#02) 2. elk 포렌식 분석
 
Docker 1.11 Presentation
Docker 1.11 PresentationDocker 1.11 Presentation
Docker 1.11 Presentation
 

Mais de Docker, Inc.

Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 
Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWS
Docker, Inc.
 

Mais de Docker, Inc. (20)

Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience Containerize Your Game Server for the Best Multiplayer Experience
Containerize Your Game Server for the Best Multiplayer Experience
 
How to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker BuildHow to Improve Your Image Builds Using Advance Docker Build
How to Improve Your Image Builds Using Advance Docker Build
 
Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWS
 
Securing Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINXSecuring Your Containerized Applications with NGINX
Securing Your Containerized Applications with NGINX
 
How To Build and Run Node Apps with Docker and Compose
How To Build and Run Node Apps with Docker and ComposeHow To Build and Run Node Apps with Docker and Compose
How To Build and Run Node Apps with Docker and Compose
 
Hands-on Helm
Hands-on Helm Hands-on Helm
Hands-on Helm
 
Distributed Deep Learning with Docker at Salesforce
Distributed Deep Learning with Docker at SalesforceDistributed Deep Learning with Docker at Salesforce
Distributed Deep Learning with Docker at Salesforce
 
The First 10M Pulls: Building The Official Curl Image for Docker Hub
The First 10M Pulls: Building The Official Curl Image for Docker HubThe First 10M Pulls: Building The Official Curl Image for Docker Hub
The First 10M Pulls: Building The Official Curl Image for Docker Hub
 
Monitoring in a Microservices World
Monitoring in a Microservices WorldMonitoring in a Microservices World
Monitoring in a Microservices World
 
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
COVID-19 in Italy: How Docker is Helping the Biggest Italian IT Company Conti...
 
Predicting Space Weather with Docker
Predicting Space Weather with DockerPredicting Space Weather with Docker
Predicting Space Weather with Docker
 
Become a Docker Power User With Microsoft Visual Studio Code
Become a Docker Power User With Microsoft Visual Studio CodeBecome a Docker Power User With Microsoft Visual Studio Code
Become a Docker Power User With Microsoft Visual Studio Code
 
How to Use Mirroring and Caching to Optimize your Container Registry
How to Use Mirroring and Caching to Optimize your Container RegistryHow to Use Mirroring and Caching to Optimize your Container Registry
How to Use Mirroring and Caching to Optimize your Container Registry
 
Monolithic to Microservices + Docker = SDLC on Steroids!
Monolithic to Microservices + Docker = SDLC on Steroids!Monolithic to Microservices + Docker = SDLC on Steroids!
Monolithic to Microservices + Docker = SDLC on Steroids!
 
Kubernetes at Datadog Scale
Kubernetes at Datadog ScaleKubernetes at Datadog Scale
Kubernetes at Datadog Scale
 
Labels, Labels, Labels
Labels, Labels, Labels Labels, Labels, Labels
Labels, Labels, Labels
 
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment ModelUsing Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
Using Docker Hub at Scale to Support Micro Focus' Delivery and Deployment Model
 
Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWS
 
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
 
Developing with Docker for the Arm Architecture
Developing with Docker for the Arm ArchitectureDeveloping with Docker for the Arm Architecture
Developing with Docker for the Arm Architecture
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

Monitoring Containers at New Relic by Sean Kane

  • 1. Monitoring Containers at New Relic Sean Kane Lead Site Reliability Engineer New Relic
  • 2. • Docker Daemon Logs • Jun 19 09:00:03 docker-20 docker: time="2016-06-19T09:00:03.938763022-07:00" level=error msg="HTTP Error" err="no such id: fbfe…cdca5607590e5” statusCode=404 • Docker Container (Application) Logs • 2016-06-18 23:15:14,265{PST} [KafkaProducerPoolService STARTING] INFO c.n.d.n.p.KafkaProducerPoolService - added producer 1 • Docker Events • 2016-06-19T16:40:43.108589658Z container die 2f457…040f (exitCode=2, image=progrium/stress, name=oom-2) • Docker Statistics • CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS • 24b03e00057b 54.76% 1.021 GB / 1.93 GB 52.90% 648 B / 648 B 150.3 MB / 196.5 MB 0 Docker - Data of Interest
  • 3. Heka Mozilla’s Open Source Message Processor https://github.com/mozilla-services/heka
  • 4. [DockerEventInput] type = "DockerEventInput" [DockerStatsInput] endpoint = "unix:///var/run/docker.sock" fields_from_env = ["SERVICE_ENV", "SERVICE_NAME"] decoder = "JsonDockerStatsDecoder" ticker_interval = 1 Inputs - Docker Statistics & Events
  • 5. [DockerLogInput] fields_from_env = ["SERVICE_ENV", "SERVICE_NAME"] since_path = "/var/log/heka-since" [DockerDaemonLogInput] address = "127.0.0.1:50001" type = "UdpInput" decoder = "LogfmtDecoder" Inputs - Docker Daemon/Container Logs
  • 6. template(name="ls_json" type="list" option.json="on") { constant(value="{") constant(value=""timestamp":"") property(name="timereported" dateFormat="rfc3339") constant(value="","message":"") property(name="msg") constant(value="","host":"") property(name="hostname") constant(value="","severity":"") property(name="syslogseverity-text") constant(value="","facility":"") property(name="syslogfacility-text") constant(value="","program":"") property(name="programname") constant(value="","pid":"") property(name="procid") constant(value=""}n") } if $programname == 'docker' then @127.0.0.1:50001;ls_json & stop rsyslog - Docker Daemon Logs
  • 7. [LogfmtDecoder] filename = "/usr/share/heka/lua_plugins/logfmt_decoder.lua" script_type = "lua" type = "SandboxDecoder" Decoders/Filters - Docker Daemon Logs
  • 8. [JsonDockerStatsDecoder] filename = "/usr/share/heka/lua_plugins/docker_stats_filter.lua" type = "SandboxDecoder" [JsonDockerStatsDecoder.config] payload_keep = false type = "DockerStats" Decoders/Filters - Docker Statistics
  • 9. [counter_output] type = "LogOutput" message_matcher = "TRUE" encoder = "RstEncoder" [counter_file] type = "FileOutput" message_matcher = "TRUE" path = "/var/log/heka-debug.log" perm = "666" flush_count = 100 flush_operator = "OR" encoder = “RstEncoder" [RstEncoder] # Restructured Text Encoder Encoders/Outputs - Debugging
  • 10. Results - Debugging :Timestamp: 2016-06-02 00:35:18.950140231 +0000 UTC :Type: DockerEvent :Hostname: demo.example.com :Pid: 0 :Uuid: 92d64bfc-f040-4913-9b0b-171d19dd5bc7 :Logger: fffdde973eb1264b389eb4cee33d624c6b03341790cf951a3d724a4e032b0269 :Payload: id:fffdd…b0269 status:destroy from:eeacms/phoronix-test-suite time:1464827718 :EnvVersion: :Severity: 7 :Fields: | name:"ID" type:string value:”fffdde973eb1264b389eb4c…90cf951a3d724a4e032b0269” | name:"Status" type:string value:"destroy" | name:"From" type:string value:"eeacms/phoronix-test-suite" | name:"Time" type:integer value:1464827718 representation:"ts"
  • 11. [InsightsDockerStatsOutput] filename = "/usr/share/heka/lua_plugins/insights_output.lua" message_matcher = "Type == 'DockerStats'" module_directory = "/usr/share/heka/lua_modules" script_type = "lua" ticker_interval = 10 type = "SandboxOutput" [InsightsDockerStatsOutput.config] default_event_source = "DockerStats" default_event_type = "DockerStats" default_event_version = 2 event_post_count_max = 30 event_url = “https://insights-collector.newrelic.com/v1/accounts/######/events” insert_key = "REDACTED" Encoders/Outputs - Insights
  • 13.
  • 14. # curl -H "Accept: application/json" -H "X-Query-Key: REDACTED" “https://insights-api.newrelic.com/v1/ accounts/#####/query?nrql=SELECT%20%2a%20FROM%20DockerEvent%20WHERE%20Status%20%3D %20%27destroy%27%20OR%20Status%20%3D%20%27oom%27%20SINCE%201%20HOUR%20AGO” | jq { "results": [ { "events": [ { "Status": "destroy", "severity": 7, "hostname": "demo.example.com", "payload": “id:347d59b07f105f3…97d93145a27 status:destroy from:f85b5b675a9e time:1465003319", "eventVersion": 1, "logger": "347d59b07f105f3f9a8057069d4f5e2b444ddebf2829a13fb5a5697d93145a27", "eventSource": "DockerEvent", "Time": 1465003319, "ID": "347d59b07f105f3f9a8057069d4f5e2b444ddebf2829a13fb5a5697d93145a27", "From": "f85b5b675a9e", "type": "DockerEvent", "timestamp": 1465003319436 }, … Insights - API Query
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. Overview • Docker Endpoints • Heka • https://github.com/mozilla-services/heka • TOML - Tom's Obvious, Minimal Language • https://github.com/toml-lang/toml • New Relic Insights • https://newrelic.com/insights • New Relic Alerting • https://blog.newrelic.com/2015/05/06/new-relic-alerts/
  • 23. Book: http://shop.oreilly.com/ product/0636920036142.do More about Docker Docker: Up and Running - Online Course June 28 & 29, 2016 Class: http://www.oreilly.com/online- training/docker-up-and-running.html