Monitoring Docker with ELK

Daniel Berman
Daniel BermanProduct Evangelist à Logz.io
Monitoring Containers
with the ELK Stack
Solomon Hykes, DockerCon
2016
Daniel Berman
• Product Evangelist @Logzio
• LAMPer
• Contributor on SitePoint and DZone
• TLV-PHP Meetup organizer
• @proudboffin, daniel@logz.io
Monitoring Docker with ELK
2-Mins on
• End-to-end ELK as a service
• Auto-scaling, secure
• SOC-II compliant, ISO27001
• AWS-based
• Alerting, user-control, ELK Apps
Agenda
• Why logging?
• The logging challenge
• The Docker challenge
• Common logging solutions
• Introducing ELK
• Docker log collector
• Demo
• Questions?
RFID Windows App
Database
asd
Sensors App server
Mainframe Active directory
Network Security
Exchange
Why logging?
Web server
State of logging
The shift to open source
The logging challenge
The logging challenge
• No centralization
• No consistency
• No accessibility
* Puppet DevOps Survey
2016
The Docker challenge
Distribution and
diversification
2016-06-02T13:05:22.614090Z 0 [Note] InnoDB: 5.7.12 started; log sequence number 2522067
CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O
3747bd397456 0.01% 3.641 MB / 2.1 GB 0.17% 3.366 kB / 648 B 0 B / 0 B
396e42ba0d15 0.11% 1.638 MB / 2.1 GB 0.08% 9.79 kB / 648 B 348.2 kB / 0 B
468bf755240a 3.19% 45.67 MB / 2.1 GB 2.17% 25.19 MB / 17.95 MB 774.1 kB / 0 B
5f16814a3c0e 0.01% 495.6 kB / 2.1 GB 0.02% 8.564 kB / 648 B 0 B / 0 B
74cdfa7b8a0c 0.04% 3.908 MB / 2.1 GB 0.19% 2.028 kB / 648 B 0 B / 0 B
99bafb7600fc 0.00% 32.95 MB / 2.1 GB 1.57% 0 B / 0 B 2.093 MB / 20.48 kB
a48f7ba0ace7 0.04% 390.4 MB / 2.1 GB 18.59% 4.704 kB / 648 B 31.29 MB / 306.5 MB
d7b60560e4d8 0.27% 220.9 MB / 2.1 GB 10.52% 7.338 kB / 648 B 94.21 kB / 114.7 kB
$ docker logs
$ docker stats
$ docker daemon
time="2016-06-05T12:03:49.716900785Z" level=debug msg="received containerd event: &types.Event{Type:"exit",
Id:"3747bd397456cd28058bb40799cd0642f431849b5c43ce56536ab7f55a98114f", Status:0x0,
Pid:"4120a7625a592f7c95eab4b1b442a45370f6dd95b63d284714dbb58f00d0a20d", Timestamp:0x57541525}"
Containers are transient
$ tail -f
is not enough
Common logging solutions
• Application logging (data volumes)
• Logspout
• Drivers - json-file (default), syslog, fluentd, gelf,
journald
• Monitoring/Logging tools - Datadog, Papertail,
Dynatrace, Sysdig
• World’s most popular open source log analysis platform
• 4.5M downloads a month!
• Centralized logging AND: search, BI, SEO, IoT, and more
Introducing ELK
Old school logging
$ grep ' 30[1234] ' /var/logs/apache2/access.log | grep -v
baidu | grep -v Googlebot
173.230.156.8 - - [04/Sep/2015:06:10:10 +0000] "GET /morpht HTTP/1.0" 301 26
"-" "Mozilla/5.0 (pc-x86_64-linux-gnu)"
192.3.83.5 - - [04/Sep/2015:06:10:22 +0000] "GET /?q=node/add HTTP/1.0" 301
26 "http://morpht.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1)
AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.2.5"
192.3.83.5 - - [04/Sep/2015:06:10:23 +0000] "GET /?q=user/register HTTP/1.0"
301 26 "http://morpht.com/node/add" "Mozilla/5.0 (Macintosh; Intel Mac OS X
10_10_1) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.
2.5"
New school logging
type:apache AND website: "mysite" AND response: [500 TO *]
• A full-text search & analytics engine
• Open source, written in Java and based on Apache
Lucene
• Designed for speed, scalability and high availability
• Advanced querying using REST API
• Collects, processes, and forwards logs
• Over 200 input, filter and output plugins for
manipulating the data
• Open source visualization platform
• For querying and analyzing logs
• Visualizations and monitoring dashboards
The ELK pipeline
Docker —> ELK
Setup ELK: Install Elasticsearch, Logstash and Kibana
• Elasticsearch - https://hub.docker.com/_/elasticsearch/
• Logstash - https://hub.docker.com/_/logstash/
• Kibana - https://hub.docker.com/_/kibana/
• Full stack: https://hub.docker.com/r/sebp/elk/
Docker —> ELK
• Use syslog logging driver
logging:
driver: syslog
options:
syslog-address: "udp://$IP_LOGSTASH:5000"
syslog-tag: “nginx-with-syslog"
• Use logspout and Logstash module :
input {
udp {
port => 5000
codec => json
}
}
Docker Log Collector
• Dedicated container
• Unified logging layer, fetching:
• Docker logs from all the running containers per
Docker host
• Docker stats for all the containers
• Docker daemon events
How it works
• Based on docker-loghose and docker-stats
• POST /containers/{id}/attach, to fetch the logs
• GET /containers/{id}/stats, to fetch the stats of the
container
• GET /containers/json, to detect the containers that are
running when this module starts
• GET /events, to detect new containers that will start
after the module has started
Running it
$ docker pull logzio/logzio-docker
$ docker run -d --restart=always -v
/var/run/docker.sock:/var/run/docker.sock
logzio/logzio-docker -t
UfKqCazQjUYnBNcJqSryIRyDIjExjwIZ
Running options
-- no-stats, to not send stats
-- no-logs, to not send logs
-- no-dockerEvents, to not send daemon events
-i/-- statsinterval, to set the stats interval
-a, custom tag
-- matchByName / -skipByName, blacklist or whitelist
containers
What metrics to look out for
• Errors and warnings
• Container CPU%
• Container memory usage
• # of running containers
• Network usage
Demo time!
Monitoring Docker with ELK
Resources
• Logz.io blog: http://logz.io/blog/
• Elastic: https://www.elastic.co/learn
• Loggly blog:
https://www.loggly.com/blog/topic/general/
Thanks!
@proudboffin |
daniel@logz.io
Performance agent
$ docker pull logzio/logzio-perfagent
$ docker run -d --net="host" -e
LOGZ_TOKEN="UfKqCazQjUYnBNcJqSryIRyDIjExjwIZ"-
e USER_TAG="workers" -e HOSTNAME=`hostname` -
e INSTANCE="10.1.2.3" --restart=always
logzio/logzio-perfagent
1 sur 36

Recommandé

'Scalable Logging and Analytics with LogStash' par
'Scalable Logging and Analytics with LogStash''Scalable Logging and Analytics with LogStash'
'Scalable Logging and Analytics with LogStash'Cloud Elements
9.9K vues23 diapositives
Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana. par
Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.
Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.Airat Khisamov
2.9K vues23 diapositives
Learn ELK in docker par
Learn ELK in dockerLearn ELK in docker
Learn ELK in dockerLarry Cai
5.7K vues21 diapositives
"How about no grep and zabbix?". ELK based alerts and metrics. par
"How about no grep and zabbix?". ELK based alerts and metrics."How about no grep and zabbix?". ELK based alerts and metrics.
"How about no grep and zabbix?". ELK based alerts and metrics.Vladimir Pavkin
10.1K vues41 diapositives
MySQL Slow Query log Monitoring using Beats & ELK par
MySQL Slow Query log Monitoring using Beats & ELKMySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKYoungHeon (Roy) Kim
9.4K vues15 diapositives
LogStash in action par
LogStash in actionLogStash in action
LogStash in actionManuj Aggarwal
1.3K vues48 diapositives

Contenu connexe

Tendances

Logstash par
LogstashLogstash
Logstash琛琳 饶
34.5K vues33 diapositives
Elk devops par
Elk devopsElk devops
Elk devopsIdeato
2.9K vues41 diapositives
elk_stack_alexander_szalonnas par
elk_stack_alexander_szalonnaselk_stack_alexander_szalonnas
elk_stack_alexander_szalonnasAlexander Szalonnas
1.9K vues29 diapositives
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ... par
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...ForgeRock
7.9K vues20 diapositives
Logstash family introduction par
Logstash family introductionLogstash family introduction
Logstash family introductionOwen Wu
1.3K vues38 diapositives
More kibana par
More kibanaMore kibana
More kibana琛琳 饶
5K vues41 diapositives

Tendances(20)

Elk devops par Ideato
Elk devopsElk devops
Elk devops
Ideato2.9K vues
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ... par ForgeRock
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...
Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit ...
ForgeRock7.9K vues
Logstash family introduction par Owen Wu
Logstash family introductionLogstash family introduction
Logstash family introduction
Owen Wu1.3K vues
ELK Ruminating on Logs (Zendcon 2016) par Mathew Beane
ELK Ruminating on Logs (Zendcon 2016)ELK Ruminating on Logs (Zendcon 2016)
ELK Ruminating on Logs (Zendcon 2016)
Mathew Beane1.7K vues
Elastic - ELK, Logstash & Kibana par SpringPeople
Elastic - ELK, Logstash & KibanaElastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & Kibana
SpringPeople3.5K vues
Collect distributed application logging using fluentd (EFK stack) par Marco Pas
Collect distributed application logging using fluentd (EFK stack)Collect distributed application logging using fluentd (EFK stack)
Collect distributed application logging using fluentd (EFK stack)
Marco Pas2.1K vues
Elastic{ON} 2016 Review - 김종민 님 par NAVER D2
Elastic{ON} 2016 Review - 김종민 님Elastic{ON} 2016 Review - 김종민 님
Elastic{ON} 2016 Review - 김종민 님
NAVER D25.2K vues
Logging logs with Logstash - Devops MK 10-02-2016 par Steve Howe
Logging logs with Logstash - Devops MK 10-02-2016Logging logs with Logstash - Devops MK 10-02-2016
Logging logs with Logstash - Devops MK 10-02-2016
Steve Howe451 vues
Shipping & Visualize Your Data With ELK par Adam Chen
Shipping  & Visualize Your Data With ELKShipping  & Visualize Your Data With ELK
Shipping & Visualize Your Data With ELK
Adam Chen1.3K vues
Logstash: Get to know your logs par SmartLogic
Logstash: Get to know your logsLogstash: Get to know your logs
Logstash: Get to know your logs
SmartLogic5K vues
Scaling an ELK stack at bol.com par Renzo Tomà
Scaling an ELK stack at bol.comScaling an ELK stack at bol.com
Scaling an ELK stack at bol.com
Renzo Tomà22.5K vues
ELK stack at weibo.com par 琛琳 饶
ELK stack at weibo.comELK stack at weibo.com
ELK stack at weibo.com
琛琳 饶2.9K vues

En vedette

Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki... par
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...Andrii Vozniuk
3.7K vues69 diapositives
Lessons Learned in Deploying the ELK Stack (Elasticsearch, Logstash, and Kibana) par
Lessons Learned in Deploying the ELK Stack (Elasticsearch, Logstash, and Kibana)Lessons Learned in Deploying the ELK Stack (Elasticsearch, Logstash, and Kibana)
Lessons Learned in Deploying the ELK Stack (Elasticsearch, Logstash, and Kibana)Cohesive Networks
3.7K vues29 diapositives
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server par
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk ServerUsing ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk ServerBizTalk360
1.8K vues13 diapositives
Monitoring the ELK stack using Zabbix and Grafana (Dennis Kanbier / 26-11-2015) par
Monitoring the ELK stack using Zabbix and Grafana (Dennis Kanbier / 26-11-2015)Monitoring the ELK stack using Zabbix and Grafana (Dennis Kanbier / 26-11-2015)
Monitoring the ELK stack using Zabbix and Grafana (Dennis Kanbier / 26-11-2015)Nederlandstalige Zabbix Gebruikersgroep
9.3K vues31 diapositives
Intro to sysdig in 15 minutes par
Intro to sysdig in 15 minutesIntro to sysdig in 15 minutes
Intro to sysdig in 15 minutesSysdig
744 vues17 diapositives
The Dark Art of Container Monitoring - Spanish par
The Dark Art of Container Monitoring - SpanishThe Dark Art of Container Monitoring - Spanish
The Dark Art of Container Monitoring - SpanishSysdig
486 vues37 diapositives

En vedette(20)

Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki... par Andrii Vozniuk
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Andrii Vozniuk3.7K vues
Lessons Learned in Deploying the ELK Stack (Elasticsearch, Logstash, and Kibana) par Cohesive Networks
Lessons Learned in Deploying the ELK Stack (Elasticsearch, Logstash, and Kibana)Lessons Learned in Deploying the ELK Stack (Elasticsearch, Logstash, and Kibana)
Lessons Learned in Deploying the ELK Stack (Elasticsearch, Logstash, and Kibana)
Cohesive Networks3.7K vues
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server par BizTalk360
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk ServerUsing ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
BizTalk3601.8K vues
Intro to sysdig in 15 minutes par Sysdig
Intro to sysdig in 15 minutesIntro to sysdig in 15 minutes
Intro to sysdig in 15 minutes
Sysdig 744 vues
The Dark Art of Container Monitoring - Spanish par Sysdig
The Dark Art of Container Monitoring - SpanishThe Dark Art of Container Monitoring - Spanish
The Dark Art of Container Monitoring - Spanish
Sysdig 486 vues
Interactive Animated Projected Elk Map and Terrain Model par nacis_slides
Interactive Animated Projected Elk Map and Terrain Model Interactive Animated Projected Elk Map and Terrain Model
Interactive Animated Projected Elk Map and Terrain Model
nacis_slides342 vues
Venture classpresentation par Anton Tyukov
Venture classpresentationVenture classpresentation
Venture classpresentation
Anton Tyukov308 vues
Extending Sysdig with Chisel par Sysdig
Extending Sysdig with ChiselExtending Sysdig with Chisel
Extending Sysdig with Chisel
Sysdig 941 vues
Building Trustworthy Containers par Sysdig
Building Trustworthy ContainersBuilding Trustworthy Containers
Building Trustworthy Containers
Sysdig 226 vues
Lions, Tigers and Deers: What building zoos can teach us about securing micro... par Sysdig
Lions, Tigers and Deers: What building zoos can teach us about securing micro...Lions, Tigers and Deers: What building zoos can teach us about securing micro...
Lions, Tigers and Deers: What building zoos can teach us about securing micro...
Sysdig 612 vues
09 application security fundamentals - part 2 - security mechanisms - logging par appsec
09   application security fundamentals - part 2 - security mechanisms - logging09   application security fundamentals - part 2 - security mechanisms - logging
09 application security fundamentals - part 2 - security mechanisms - logging
appsec292 vues
Web Application Security 101 - 12 Logging par Websecurify
Web Application Security 101 - 12 LoggingWeb Application Security 101 - 12 Logging
Web Application Security 101 - 12 Logging
Websecurify362 vues
Behavioural activity monitoring on CoreOS with Sysdig Falco par Sysdig
Behavioural activity monitoring on CoreOS with Sysdig FalcoBehavioural activity monitoring on CoreOS with Sysdig Falco
Behavioural activity monitoring on CoreOS with Sysdig Falco
Sysdig 1K vues
IT Infrastructure Monitoring Strategies in Healthcare par CA Technologies
IT Infrastructure Monitoring Strategies in HealthcareIT Infrastructure Monitoring Strategies in Healthcare
IT Infrastructure Monitoring Strategies in Healthcare
CA Technologies3.2K vues
Docker Indy Meetup Monitoring 30-Aug-2016 par Matt Bentley
Docker Indy Meetup Monitoring 30-Aug-2016Docker Indy Meetup Monitoring 30-Aug-2016
Docker Indy Meetup Monitoring 30-Aug-2016
Matt Bentley199 vues

Similaire à Monitoring Docker with ELK

Machine Learning and Logging for Monitoring Microservices par
Machine Learning and Logging for Monitoring Microservices Machine Learning and Logging for Monitoring Microservices
Machine Learning and Logging for Monitoring Microservices Daniel Berman
1.8K vues39 diapositives
Monitoring Containers at New Relic by Sean Kane par
Monitoring Containers at New Relic by Sean Kane Monitoring Containers at New Relic by Sean Kane
Monitoring Containers at New Relic by Sean Kane Docker, Inc.
1.1K vues24 diapositives
Elk for applications on k8s par
Elk for applications on k8sElk for applications on k8s
Elk for applications on k8sChe-Chia Chang
1.1K vues40 diapositives
Docker Logging and analysing with Elastic Stack - Jakub Hajek par
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 PROIDEA
73 vues42 diapositives
Docker Logging and analysing with Elastic Stack par
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackJakub Hajek
157 vues42 diapositives
PostgreSQL and Linux Containers par
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux ContainersJignesh Shah
11.1K vues30 diapositives

Similaire à Monitoring Docker with ELK(20)

Machine Learning and Logging for Monitoring Microservices par Daniel Berman
Machine Learning and Logging for Monitoring Microservices Machine Learning and Logging for Monitoring Microservices
Machine Learning and Logging for Monitoring Microservices
Daniel Berman1.8K vues
Monitoring Containers at New Relic by Sean Kane par Docker, Inc.
Monitoring Containers at New Relic by Sean Kane Monitoring Containers at New Relic by Sean Kane
Monitoring Containers at New Relic by Sean Kane
Docker, Inc.1.1K vues
Docker Logging and analysing with Elastic Stack - Jakub Hajek par PROIDEA
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
PROIDEA73 vues
Docker Logging and analysing with Elastic Stack par Jakub Hajek
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack
Jakub Hajek157 vues
PostgreSQL and Linux Containers par Jignesh Shah
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux Containers
Jignesh Shah11.1K vues
Oracle WebLogic Diagnostics & Perfomance tuning par Michel Schildmeijer
Oracle WebLogic Diagnostics & Perfomance tuningOracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuning
Michel Schildmeijer15.6K vues
Host Health Monitoring with Docker Run par Noah Zoschke
Host Health Monitoring with Docker RunHost Health Monitoring with Docker Run
Host Health Monitoring with Docker Run
Noah Zoschke3K vues
OSMC 2021 | Use OpenSource monitoring for an Enterprise Grade Platform par NETWAYS
OSMC 2021 | Use OpenSource monitoring for an Enterprise Grade PlatformOSMC 2021 | Use OpenSource monitoring for an Enterprise Grade Platform
OSMC 2021 | Use OpenSource monitoring for an Enterprise Grade Platform
NETWAYS106 vues
DOD 2016 - Stefan Thies - Monitoring and Log Management for Docker Swarm and... par PROIDEA
 DOD 2016 - Stefan Thies - Monitoring and Log Management for Docker Swarm and... DOD 2016 - Stefan Thies - Monitoring and Log Management for Docker Swarm and...
DOD 2016 - Stefan Thies - Monitoring and Log Management for Docker Swarm and...
PROIDEA181 vues
Open shift enterprise 3.1 paas on kubernetes par Samuel Terburg
Open shift enterprise 3.1   paas on kubernetesOpen shift enterprise 3.1   paas on kubernetes
Open shift enterprise 3.1 paas on kubernetes
Samuel Terburg3.1K vues
OpenShift Enterprise 3.1 vs kubernetes par Samuel Terburg
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetes
Samuel Terburg42.1K vues
Getting Started with Docker par visual28
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
visual28137 vues
A fun cup of joe with open liberty par Andy Mauer
A fun cup of joe with open libertyA fun cup of joe with open liberty
A fun cup of joe with open liberty
Andy Mauer186 vues

Dernier

Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... par
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...ShapeBlue
79 vues17 diapositives
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ par
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericConfidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericShapeBlue
88 vues9 diapositives
Ransomware is Knocking your Door_Final.pdf par
Ransomware is Knocking your Door_Final.pdfRansomware is Knocking your Door_Final.pdf
Ransomware is Knocking your Door_Final.pdfSecurity Bootcamp
90 vues46 diapositives
Business Analyst Series 2023 - Week 4 Session 7 par
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7DianaGray10
126 vues31 diapositives
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... par
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...ShapeBlue
85 vues10 diapositives
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool par
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPoolShapeBlue
84 vues10 diapositives

Dernier(20)

Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... par ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue79 vues
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ par ShapeBlue
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericConfidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
ShapeBlue88 vues
Business Analyst Series 2023 - Week 4 Session 7 par DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10126 vues
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... par ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue85 vues
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool par ShapeBlue
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue84 vues
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... par TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc160 vues
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue par ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue103 vues
Digital Personal Data Protection (DPDP) Practical Approach For CISOs par Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash153 vues
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... par ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue132 vues
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... par ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue98 vues
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... par ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue158 vues
Data Integrity for Banking and Financial Services par Precisely
Data Integrity for Banking and Financial ServicesData Integrity for Banking and Financial Services
Data Integrity for Banking and Financial Services
Precisely78 vues
The Power of Heat Decarbonisation Plans in the Built Environment par IES VE
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built Environment
IES VE69 vues
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... par ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue123 vues
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... par ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue146 vues
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online par ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue181 vues
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue par ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue163 vues

Monitoring Docker with ELK

  • 3. Daniel Berman • Product Evangelist @Logzio • LAMPer • Contributor on SitePoint and DZone • TLV-PHP Meetup organizer • @proudboffin, daniel@logz.io
  • 5. 2-Mins on • End-to-end ELK as a service • Auto-scaling, secure • SOC-II compliant, ISO27001 • AWS-based • Alerting, user-control, ELK Apps
  • 6. Agenda • Why logging? • The logging challenge • The Docker challenge • Common logging solutions • Introducing ELK • Docker log collector • Demo • Questions?
  • 7. RFID Windows App Database asd Sensors App server Mainframe Active directory Network Security Exchange Why logging? Web server
  • 9. The shift to open source
  • 11. The logging challenge • No centralization • No consistency • No accessibility * Puppet DevOps Survey 2016
  • 14. 2016-06-02T13:05:22.614090Z 0 [Note] InnoDB: 5.7.12 started; log sequence number 2522067 CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O 3747bd397456 0.01% 3.641 MB / 2.1 GB 0.17% 3.366 kB / 648 B 0 B / 0 B 396e42ba0d15 0.11% 1.638 MB / 2.1 GB 0.08% 9.79 kB / 648 B 348.2 kB / 0 B 468bf755240a 3.19% 45.67 MB / 2.1 GB 2.17% 25.19 MB / 17.95 MB 774.1 kB / 0 B 5f16814a3c0e 0.01% 495.6 kB / 2.1 GB 0.02% 8.564 kB / 648 B 0 B / 0 B 74cdfa7b8a0c 0.04% 3.908 MB / 2.1 GB 0.19% 2.028 kB / 648 B 0 B / 0 B 99bafb7600fc 0.00% 32.95 MB / 2.1 GB 1.57% 0 B / 0 B 2.093 MB / 20.48 kB a48f7ba0ace7 0.04% 390.4 MB / 2.1 GB 18.59% 4.704 kB / 648 B 31.29 MB / 306.5 MB d7b60560e4d8 0.27% 220.9 MB / 2.1 GB 10.52% 7.338 kB / 648 B 94.21 kB / 114.7 kB $ docker logs $ docker stats $ docker daemon time="2016-06-05T12:03:49.716900785Z" level=debug msg="received containerd event: &types.Event{Type:"exit", Id:"3747bd397456cd28058bb40799cd0642f431849b5c43ce56536ab7f55a98114f", Status:0x0, Pid:"4120a7625a592f7c95eab4b1b442a45370f6dd95b63d284714dbb58f00d0a20d", Timestamp:0x57541525}"
  • 16. $ tail -f is not enough
  • 17. Common logging solutions • Application logging (data volumes) • Logspout • Drivers - json-file (default), syslog, fluentd, gelf, journald • Monitoring/Logging tools - Datadog, Papertail, Dynatrace, Sysdig
  • 18. • World’s most popular open source log analysis platform • 4.5M downloads a month! • Centralized logging AND: search, BI, SEO, IoT, and more Introducing ELK
  • 19. Old school logging $ grep ' 30[1234] ' /var/logs/apache2/access.log | grep -v baidu | grep -v Googlebot 173.230.156.8 - - [04/Sep/2015:06:10:10 +0000] "GET /morpht HTTP/1.0" 301 26 "-" "Mozilla/5.0 (pc-x86_64-linux-gnu)" 192.3.83.5 - - [04/Sep/2015:06:10:22 +0000] "GET /?q=node/add HTTP/1.0" 301 26 "http://morpht.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.2.5" 192.3.83.5 - - [04/Sep/2015:06:10:23 +0000] "GET /?q=user/register HTTP/1.0" 301 26 "http://morpht.com/node/add" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600. 2.5"
  • 20. New school logging type:apache AND website: "mysite" AND response: [500 TO *]
  • 21. • A full-text search & analytics engine • Open source, written in Java and based on Apache Lucene • Designed for speed, scalability and high availability • Advanced querying using REST API
  • 22. • Collects, processes, and forwards logs • Over 200 input, filter and output plugins for manipulating the data
  • 23. • Open source visualization platform • For querying and analyzing logs • Visualizations and monitoring dashboards
  • 25. Docker —> ELK Setup ELK: Install Elasticsearch, Logstash and Kibana • Elasticsearch - https://hub.docker.com/_/elasticsearch/ • Logstash - https://hub.docker.com/_/logstash/ • Kibana - https://hub.docker.com/_/kibana/ • Full stack: https://hub.docker.com/r/sebp/elk/
  • 26. Docker —> ELK • Use syslog logging driver logging: driver: syslog options: syslog-address: "udp://$IP_LOGSTASH:5000" syslog-tag: “nginx-with-syslog" • Use logspout and Logstash module : input { udp { port => 5000 codec => json } }
  • 27. Docker Log Collector • Dedicated container • Unified logging layer, fetching: • Docker logs from all the running containers per Docker host • Docker stats for all the containers • Docker daemon events
  • 28. How it works • Based on docker-loghose and docker-stats • POST /containers/{id}/attach, to fetch the logs • GET /containers/{id}/stats, to fetch the stats of the container • GET /containers/json, to detect the containers that are running when this module starts • GET /events, to detect new containers that will start after the module has started
  • 29. Running it $ docker pull logzio/logzio-docker $ docker run -d --restart=always -v /var/run/docker.sock:/var/run/docker.sock logzio/logzio-docker -t UfKqCazQjUYnBNcJqSryIRyDIjExjwIZ
  • 30. Running options -- no-stats, to not send stats -- no-logs, to not send logs -- no-dockerEvents, to not send daemon events -i/-- statsinterval, to set the stats interval -a, custom tag -- matchByName / -skipByName, blacklist or whitelist containers
  • 31. What metrics to look out for • Errors and warnings • Container CPU% • Container memory usage • # of running containers • Network usage
  • 34. Resources • Logz.io blog: http://logz.io/blog/ • Elastic: https://www.elastic.co/learn • Loggly blog: https://www.loggly.com/blog/topic/general/
  • 36. Performance agent $ docker pull logzio/logzio-perfagent $ docker run -d --net="host" -e LOGZ_TOKEN="UfKqCazQjUYnBNcJqSryIRyDIjExjwIZ"- e USER_TAG="workers" -e HOSTNAME=`hostname` - e INSTANCE="10.1.2.3" --restart=always logzio/logzio-perfagent

Notes de l'éditeur

  1. Need to start looking at our Docker environment from a more high level view. This talk will also try and approach Docker from a more holistic point of view.
  2. One picture is worth 1000 words! Chaos
  3. Logging is hands down the best way to see how your application is behaving, and when utilized properly allows you to catch problems early and make key technical decisions. IT infrastructures on the cloud
  4. Multiple use cases across operations, security, BI and IoT
  5. Log analytics market - divided into two disproportionate parts Splunk invented the space, small section of the market. Majority of the market are using ELK. Open source sitting on the convergence of various log analytics software: Hadoop, Spark, Elasticsearch Hadoop, Spark, Graphite, Kafka…ELK!
  6. Log analysis is like automated testing. Everyone know they need to do it, but no one ever does do it.
  7. Logs are coming in from a huge amount of servers all over the place - they can be on the cloud, local or hybrid. Puppet survey. Logging is different for each app/system: PHP/node, apache/nginx Large production environments consist of hundreds of servers Large data volume, difficult to find - remote access, authentication SSHing + GREPing is simply not enough
  8. Multiple containers per host, each with its own env, dedicated process - monitoring logs for each container is not a viable option Number of processes running within the same container Logz.io: 60 hosts running at any given time, each with a number of containers
  9. Various types of data being outputted by each container
  10. Traditional logging and monitoring took metrics static servers with long uptime Containers come and go, constantly moving, dynamic - some Docker servers run hundreds of short-term containers s You can’t log to the container since the data will be lost
  11. Data is no longer persistent and accessible, in the container era - data is ephemeral and distributed, turning log analytics into an engineering art Log analytics has become black magic - not unprone to human mistakes and errors.
  12. Application logging using data volumes - app handles logging using a logging framework, drawbacks: requires setup in app, no stats/events Logspout - runs as a container per host, drawbacks: only for stdout/stderr, no stats/events, not meant for management so no retention. Extremely popular (Datadog research) Drivers - drawbacks: tough to troubleshoot and administrate, miss out on daemon events and stats, requires extra config SaaS - cost, focus on monitoring metrics
  13. Why so popular? Simple and beautiful! Easy to get started UI is awesome! Open Source and free! Fast, very fast!
  14. Website down scenario
  15. Distributed architecture (sharding, replication) allows for huge capacity, scaling up to hundreds of servers and storing petabytes of data On the same hardware, queries that would take more than 10 seconds using SQL will return results in under 10 milliseconds in Elasticsearch. The result of all this is: a fast, scalable and reliable data store that can power any data discovery application.
  16. The stack’s workhorse - can process data from any source Hundreds of output plugins: AWS S3, MongoDB, Redis, Riak and many more
  17. 2225 Elasticsearch images Over 100K pulls, configures log rotation, certification keys for log shippers.
  18. In both cases, stdout and stderr output Downfalls: Per host Resource consumption No stats/events
  19. Dedicated container making logging a part of the architecture Simplified scaling - simply run a container Daemon events: attach, commit, copy, create, destroy, detach, die, etc. — for understanding the lifecycle of containers
  20. On GitHub, so you can customize it any way you want.
  21. Errors and warnings Container CPU% - will help you set CPU limits for containers Container memory usage - will help you set memory limits for containers # of running containers - handy during deployments and updates to check that everything is running like before Network usage
  22. No silver bullet! (Bela Lugosi, 1931) Docker is still not mature enough, does not mean that logging is not necessary! ELK - is scalable, adds visualization layer, easier centralized analysis
  23. Monitoring host performance (not just Docker) collectl Rsyslog