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
110
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
310
APIStrat 2016 | OpenAPI Trek: Beyond API Documentation (Arnaud Lauret)
apistrat
5
240
APIStrat 2016 | Flying Dreams: Real-Time Communication from the Edge of Space (Jonathan Barton, Neha Abrol)
apistrat
1
150
APIStrat 2016 | On-prem support? That was so 1982 (Charlie Ozinga)
apistrat
0
130
APIStrat 2016 | Effortless microservices in production with Kubernetes (Ken Wronkiewicz)
apistrat
0
180
Song by Tony Blank
apistrat
0
200
API Lifecycle Manager by Steve Fonseca
apistrat
2
260
APIs In The Enterprise: How Walgreens Formed It's Digital Business by Drew Schweinfurth
apistrat
1
400
Developers Are Difficult by Andrew Noonan
apistrat
0
140
Other Decks in Technology
See All in Technology
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
2
380
FastMCP OAuth Proxy with Cognito
hironobuiga
3
210
「AIエージェントで変わる開発プロセス―レビューボトルネックからの脱却」
lycorptech_jp
PRO
0
150
MCPで決済に楽にする
mu7889yoon
0
130
Physical AI on AWS リファレンスアーキテクチャ / Physical AI on AWS Reference Architecture
aws_shota
1
160
Phase04_ターミナル基礎
overflowinc
0
2.6k
脳が溶けた話 / Melted Brain
keisuke69
1
1.1k
BFCacheを活用して無限スクロールのUX を改善した話
apple_yagi
0
130
ハーネスエンジニアリング×AI適応開発
aictokamiya
1
300
Bref でサービスを運用している話
sgash708
0
200
AI時代のオンプレ-クラウドキャリアチェンジ考
yuu0w0yuu
0
240
韓非子に学ぶAI活用術
tomfook
3
1k
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
240
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
400
sira's awesome portfolio website redesign presentation
elsirapls
0
200
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
420
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