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
280
APIStrat 2016 | OpenAPI Trek: Beyond API Documentation (Arnaud Lauret)
apistrat
5
220
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
99
APIStrat 2016 | Effortless microservices in production with Kubernetes (Ken Wronkiewicz)
apistrat
0
130
Song by Tony Blank
apistrat
0
150
API Lifecycle Manager by Steve Fonseca
apistrat
2
220
APIs In The Enterprise: How Walgreens Formed It's Digital Business by Drew Schweinfurth
apistrat
1
360
Developers Are Difficult by Andrew Noonan
apistrat
0
120
Other Decks in Technology
See All in Technology
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
130
日本版とグローバル版のモバイルアプリ統合の開発の裏側と今後の展望
miichan
1
130
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
560
マルチプロダクト開発の現場でAWS Security Hubを1年以上運用して得た教訓
muziyoshiz
3
2.3k
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
190
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
270
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
330
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
170
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
380
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
DevOps視点でAWS re:invent2024の新サービス・アプデを振り返ってみた
oshanqq
0
180
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
460
33k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Being A Developer After 40
akosma
87
590k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Automating Front-end Workflow
addyosmani
1366
200k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
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