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
100
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
300
APIStrat 2016 | OpenAPI Trek: Beyond API Documentation (Arnaud Lauret)
apistrat
5
230
APIStrat 2016 | Flying Dreams: Real-Time Communication from the Edge of Space (Jonathan Barton, Neha Abrol)
apistrat
1
130
APIStrat 2016 | On-prem support? That was so 1982 (Charlie Ozinga)
apistrat
0
110
APIStrat 2016 | Effortless microservices in production with Kubernetes (Ken Wronkiewicz)
apistrat
0
150
Song by Tony Blank
apistrat
0
170
API Lifecycle Manager by Steve Fonseca
apistrat
2
240
APIs In The Enterprise: How Walgreens Formed It's Digital Business by Drew Schweinfurth
apistrat
1
370
Developers Are Difficult by Andrew Noonan
apistrat
0
130
Other Decks in Technology
See All in Technology
ZOZOマッチのアーキテクチャと技術構成
zozotech
PRO
4
1.5k
Generative AI Japan 第一回生成AI実践研究会「AI駆動開発の現在地──ブレイクスルーの鍵を握るのはデータ領域」
shisyu_gaku
0
240
BPaaSにおける人と協働する前提のAIエージェント-AWS登壇資料
kentarofujii
0
140
ブロックテーマ時代における、テーマの CSS について考える Toro_Unit / 2025.09.13 @ Shinshu WordPress Meetup
torounit
0
120
実践!カスタムインストラクション&スラッシュコマンド
puku0x
0
400
Automating Web Accessibility Testing with AI Agents
maminami373
0
1.3k
「何となくテストする」を卒業するためにプロダクトが動く仕組みを理解しよう
kawabeaver
0
410
大「個人開発サービス」時代に僕たちはどう生きるか
sotarok
20
10k
なぜスクラムはこうなったのか?歴史が教えてくれたこと/Shall we explore the roots of Scrum
sanogemaru
5
1.6k
人工衛星のファームウェアをRustで書く理由
koba789
15
7.9k
Autonomous Database - Dedicated 技術詳細 / adb-d_technical_detail_jp
oracle4engineer
PRO
4
10k
要件定義・デザインフェーズでもAIを活用して、コミュニケーションの密度を高める
kazukihayase
0
110
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Practical Orchestrator
shlominoach
190
11k
Building Applications with DynamoDB
mza
96
6.6k
The Invisible Side of Design
smashingmag
301
51k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
Producing Creativity
orderedlist
PRO
347
40k
Designing for humans not robots
tammielis
253
25k
Optimizing for Happiness
mojombo
379
70k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
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