Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Docker Containers Monitoring by Leo Unbekandt
Search
API Strategy & Practice Conference
April 24, 2015
Technology
0
99
Docker Containers Monitoring by Leo Unbekandt
API Strategy & Practice Conference
April 24, 2015
Tweet
Share
More Decks by API Strategy & Practice Conference
See All by API Strategy & Practice Conference
APIStrat 2016 | The end of polling: why and how to transform a REST API into a Data Streaming API (Audrey Neveu)
apistrat
12
270
APIStrat 2016 | OpenAPI Trek: Beyond API Documentation (Arnaud Lauret)
apistrat
5
210
APIStrat 2016 | Flying Dreams: Real-Time Communication from the Edge of Space (Jonathan Barton, Neha Abrol)
apistrat
1
120
APIStrat 2016 | On-prem support? That was so 1982 (Charlie Ozinga)
apistrat
0
86
APIStrat 2016 | Effortless microservices in production with Kubernetes (Ken Wronkiewicz)
apistrat
0
120
Song by Tony Blank
apistrat
0
140
API Lifecycle Manager by Steve Fonseca
apistrat
2
200
APIs In The Enterprise: How Walgreens Formed It's Digital Business by Drew Schweinfurth
apistrat
1
350
Developers Are Difficult by Andrew Noonan
apistrat
0
120
Other Decks in Technology
See All in Technology
KubeConにproposalを送りたい人へのアドバイス
sat
PRO
3
270
一生覚えておきたい「システム開発=コミュニケーション」〜初めての実務案件振り返りLT〜
maimyyym
3
370
One engineer company with Ruby on Rails
rstankov
2
440
M&A戦略を支えるデータマネジメント (MIDAS Tech Study #16 GENDA Komiyama)
kommy339
1
130
LangSmith入門―トレース/評価/プロンプト管理などを担うLLMアプリ開発プラットフォーム
os1ma
5
760
開発パフォーマンスを最大化するための開発体制
ham0215
7
1.2k
Grafana x PagerDuty Better Together
jacopen
1
300
Building a RAG-poweredAI chat appwith Python and VS Code
pamelafox
0
160
データベース02: データベースの概念
trycycle
0
190
JAWS-UG Bedrock Claude Night
yamahiro
3
750
Handling focus in 2024
tahia910
0
250
令和最新版 Ruby プロファイラ "Pf2" のご紹介
osyoyu
0
140
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
8
3.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
20
1.8k
In The Pink: A Labor of Love
frogandcode
138
21k
Build your cross-platform service in a week with App Engine
jlugia
226
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
117
18k
A designer walks into a library…
pauljervisheath
201
23k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
The MySQL Ecosystem @ GitHub 2015
samlambert
244
12k
Being A Developer After 40
akosma
67
580k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
275
13k
Designing for humans not robots
tammielis
247
25k
Mobile First: as difficult as doing things right
swwweet
217
8.6k
Transcript
Docker containers monitoring Berlin 2015
Léo Unbekandt @Soulou CTO at Scalingo
Deploy, Build, Scale, Repeat
Our customers want metrics to help them in their decision
making
DOCKER AS A TOOL ?
DOCKER AS A TOOL • Deployment … OK
DOCKER AS A TOOL • Deployment … OK • Execution
… OK
DOCKER AS A TOOL • Deployment … OK • Execution
… OK • Monitoring … ?
- Memory usage - CPU percentage - Disk IO -
Network bandwidth What metrics?
Docker Remote API GET /containers/:id/stats Stats API
Docker Remote API generates load
Docker Remote API is not configurable
Docker →is not enough So
Linux API Control groups Namespaces
Control Groups CPU, Memory, IO Namespaces Network
Memory usage? Memory cgroup /sys/fs/cgroup/memory/docker/:id
Memory cgroup Files memory.usage_in_bytes memory.limit_in_bytes memory.memsw.usage_in_bytes memory.memsw.limit_in_bytes Bytes Are Easy
CPU usage? cpuacct cgroup /sys/fs/cgroup/cpuacct/docker/:id
Cpuaccnt cgroup Files cpuacct.usage cpuacct.usage_percpu → number of nanoseconds allocated
to the container since its start
Nanoseconds? Let's calculate!
How to get a CPU percentage? /proc/stat User nice system
idle iowait irq softirq 7277 51882 500481 6104557 72847 217 168631 Sum of values = CPU usage since system boot (in 1/100th second)
Delta of container usage = 0-100% ———————————————————— Delta of system
usage How to get a CPU percentage?
What are the IO? blkio cgroup /sys/fs/cgroup/blkio/docker/:id → Bytes read/write
by device
blkio cgroup File blkio.io_service_bytes
Namespaces Networking
Not a control group unfortunately… Network namespace
Network namespace Monitoring agent in the namespace setns() Linux system
call
Network namespace Don't worry github.com/Scalingo/go-netns
Interface Received bytes packets errs … eth0 12520750 102418 0
lo 7796 560 0 Interface Transmit bytes packets errs … eth0 641338 165423 0 lo 97796 250 0 Netstat in namespace
Enter “Acadock” Acadock monitoring Linux APIs Docker HTTP API Acadock
HTTP API Data visualisation via websockets
Got what we want
Thank you Léo Unbekandt - @Soulou github.com/Scalingo/acadock-monitoring github.com/Scalingo/acadock github.com/Scalingo/go-netns github.com/Scalingo/go-netstat