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
Prometheusで監視・モニタリング #hackt
Search
Manabu Matsuzaki
September 11, 2016
Programming
3
1k
Prometheusで監視・モニタリング #hackt
Manabu Matsuzaki
September 11, 2016
Tweet
Share
More Decks by Manabu Matsuzaki
See All by Manabu Matsuzaki
Spring BootユーザのためのArmeria入門 #jsug / Introduce to Armeria for Spring users
matsumana
0
2.6k
Canary Release with Argo Rollouts #ふくばねてす / canary-release-with-argo-rollouts
matsumana
1
1.1k
Getting started Central Dogma with Golang #fukuokago #umedago / getting-started-central-dogma-with-golang
matsumana
0
860
Micrometer入門 #javaq / introduce-to-micrometer
matsumana
1
2.7k
ArmeriaとCentral Dogmaから学ぶ、マイクロサービスに必要な機能 #edayfuk / lean-from-armeria-and-central-dogma
matsumana
0
4.1k
SREcon19 Americas 参加レポート #srefukuoka / srecon19-americas-report
matsumana
0
820
SRE入門 & チームで取り組んでいるSRE #srefukuoka / introduce-to-sre
matsumana
0
1.2k
Introduce to Armeria and Central Dogma #GWD_Nulab / introduce-to-armeria-and-central-dogma
matsumana
0
550
Connector/JでMaster/Slave Replication構成のMySQLに接続する #mysql_casual_fukuoka /connector-j-master-slave-replication
matsumana
0
1.4k
Other Decks in Programming
See All in Programming
シールドクラスをはじめよう / Getting Started with Sealed Classes
mackey0225
3
400
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
23k
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
340
現場で役立つモデリング 超入門
masuda220
PRO
13
2.9k
レガシーな Android アプリのリアーキテクチャ戦略
oidy
1
170
ECSのサービス間通信 4つの方法を比較する 〜Canary,Blue/Greenも添えて〜
tkikuc
11
2.3k
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
4
4.3k
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
7
2.8k
/←このスケジュール表に立ち向かう フロントエンド開発戦略 / A front-end development strategy to tackle a single-slash schedule.
nrslib
1
590
Kotlin2でdataクラスの copyメソッドを禁止する/Data class copy function to have the same visibility as constructor
eichisanden
1
140
CSC305 Lecture 13
javiergs
PRO
0
130
gopls を改造したら開発生産性が高まった
satorunooshie
8
240
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
How to Ace a Technical Interview
jacobian
275
23k
Facilitating Awesome Meetings
lara
49
6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.2k
Teambox: Starting and Learning
jrom
132
8.7k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
KATA
mclloyd
29
13k
Faster Mobile Websites
deanohume
304
30k
Designing the Hi-DPI Web
ddemaree
280
34k
What's new in Ruby 2.0
geeforr
342
31k
The Invisible Side of Design
smashingmag
297
50k
Transcript
PrometheusͰ ࢹɾϞχλϦϯά Hacker Tackle 2016 2016/09/10 @matsumana
ࣗݾհ • ໊લɿ দ࡚ ֶ • Twitterɿ @matsumana • ৬ۀɿ
ιϑτΣΞΤϯδχΞ ʢϓϩάϥϚɺWebαʔϏεӡ༻ʣ
ΞδΣϯμ • Prometheusͷհ • ଞͷπʔϧͱͷൺֱ • promgenͷհ • exporterʹ͍ͭͯ
Ξϯέʔτ
ݱࡏԿΛͬͯ·͔͢ʁ • Nagios • Ganglia • Munin • Cacti •
Zabbix • AWS CloudWatch • Datadog • Mackerel • New Relic • ͦΕҎ֎
PrometheusͷࣄΛ ͬͯ·͔ͨ͠ʁ
Prometheusͱ • SoundCloud͕ࣾ։ൃ͠ɺOSSͱͯ͠ެ։͍ͯ͠ΔࢹɾϞχλϦϯάπʔϧ • ࠷ॳͷcommit2012/11/24 • 2016/07/18ʹ1.0.0ϦϦʔε (ࠓ࣌Ͱͷ࠷৽1.1.0) • ࠷্͕ۙঢத
• Prometheus Casual Talks @౦ژ → ࢀՃऀ100໊ • Prometheus Core Developer Björn Rabenstein Open Q&A @ϩϯυϯ ˠ ࢀՃऀ 27໊ • PromCon 2016 @ϕϧϦϯ → ࢀՃऀ 80໊
Prometheusͷػೳ • time series database (࣌ܥྻσʔλϕʔε) • ϝτϦΫεऩू & อଘ
• อଘͨ͠ϝτϦΫεʹର͢ΔΫΤϦ • ͖͍͠Λઃఆͯ͠ΞϥʔτΛඈ͢ • μογϡϘʔυ
Prometheusʹແ͍ػೳ • ੜϩά/Πϕϯτσʔλͷऩू (Elasticsearchͷ༷ͳ) • ϦΫΤετͷτϨʔγϯά (Zipkinͷ༷ͳ) • ػցֶशσʔλϚΠχϯάʹΑΔݕग़ •
ϝτϦΫεͷظอଘετϨʔδ • ࣗಈతͳਫฏεέʔϦϯά • Ϣʔβೝূ
ͦͷଞͷಛ • golangͰॻ͔Ε͍ͯΔ • pullܕ ࢹରϊʔυʹexportorΛΠϯετʔϧͯ͠Prometheus͔ΒϙʔϦϯά • Grafanaͱ࿈ܞՄೳ • PrometheusࣗମʹPromDashͱ͍͏μογϡϘʔυπʔϧ͕͋Δ͕ɺ
Grafanaͱͷ࿈ܞ͕ਪ • CNCF(Cloud Native Computing Foundation)ͷϓϩδΣΫτʹͳͬͨ • Kubernetesͱ౷߹Մೳ ※ͱݴͬͯDocker༻Ͱͳ͍ͷͰɺͪΖΜΦϯϓϨͰ͑Δ
ΞʔΩςΫνϟ
pros • Grafanaͱ࿈ܞग़དྷΔ • ΫΤϦ͕ॻ͚Δ • αʔόεϖοΫϝτϦΫεʹΑΔͱࢥ͏͕ 1ͷαʔόͰࢁͷϊʔυΛࢹͰ͖ΔΒ͍͠ • 1ͷαʔόͰ3,000ϊʔυ͘Β͍ࢹग़དྷΔΒ͍͠
• AWSͷ߹ɺ50ʙ100ϊʔυ͘Β͍ͳΒαʔόεϖοΫ t2.medium(CPU: 2Core, Mem: 4GB)ͰेΒ͍͠ • exportor͕๛ɻ͠ཉ͍͠ͷ͕ແ͚Ε؆୯ʹ࡞ΕΔ
cons • ໊લ͕ΞϨͳͷͰάάΓʹ͍͘ ʢөըɺΪϦγϟਆͷਆʣ • ΫΤϦͷॻ͖ํ͕Α͘Θ͔Βͳ͍ • ࢹରϊʔυͷՃઃఆϑΝΠϧʹॻ͍ͯ ϓϩηεΛ࠶ىಈʢGUI͕ͳ͍ʣ •
TimeZone͕GMT (GrafanaΛ͑ͳ͍)
ଞͷπʔϧͱͷൺֱ • ྫ͑Zabbixͱൺֱ͢ΔͱɺͲΜͳײ͡ʁ • γϯϓϧ ʘ(^o^)ʗ • ίϯϙʔωϯτ͕ૄ݁߹ͳͷɺ 1ͭͷαʔϏεͰϊʔυࢹ͢Δ͚ͩͳΒZabbixͷ༷ͳ ΦʔϧΠϯϫϯͷํ͕͍͍͔
(´ɾωɾʆ) • WebUIͰઃఆग़དྷͳ͍ (´ɾωɾʆ) • ϝϯςφϯε͕࣌ؒઃఆग़དྷͳ͍ (´ɾωɾʆ) • Ξϥʔτૹ৴ઌϝʔϧΞυϨεͷઃఆ͕ࡉ͔͘ग़དྷͳ͍ (´ɾωɾʆ)
Prometheus ྑ͍Μ͚ͩͲ ͦͷ··͏ͷ ݁ߏͭΒ͍
ͦ͜Ͱ
promgen • GitHubͰެ։த • https://github.com/line/promgen • WebUIͰઃఆ͕Մೳ
promgen Service
promgen Project
ΞʔΩςΫνϟ (࠶ܝ)
Prometheus w/ promgen
exporter
Α͍ͦ͘͏ͳexporter • Default port allocations Wikiࣗ༝ʹฤूՄೳɻศརͳexporterΛ࡞ͬͨΒొ͠Α͏ʂ • node_exporter • blackbox_exporter
• nginx_exporter • apache_exporter • mysqld_exporter • redis_exporter • memcached_exporter • jmx_exporter • zookeeper_exporter • elasticsearch_exporter
exporterͷ࡞Γํ • ΫϥΠΞϯτϥΠϒϥϦΛ͏ͱָ • client_java • client_golang • client_python •
client_ruby
exporterͷಈ࡞Πϝʔδ
exporterΛࢹରΞϓϦʹΈࠐΉࣄՄೳ
γϯϓϧͳ exporterͷιʔεΛྫʹ ࡞ΓํΛઆ໌͠·͢
σϞ • promgen • Prometheus • Grafana
ϦϯΫू • ΦϑΟγϟϧ • prometheus.io • Github Organization • YouTubeνϟϯωϧ
ʢPromConͷಈը͋Γʣ ← ͓͢͢Ί • Prometheus Casual Talks #1Λ։࠵͠·ͨ͠ • Prometheus London meetupͰLT͖ͯ͠·ͨ͠ • PromCon 2016ʹߦͬͯൃද͖ͯ͠·ͨ͠ • promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus casual