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
1.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.7k
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
830
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
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
2
120
선언형 UI에서의 상태관리
l2hyunwoo
0
180
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
240
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
8
1.8k
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
500
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
160
良いユニットテストを書こう
mototakatsu
8
3k
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
260
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
110
Jakarta EE meets AI
ivargrimstad
0
260
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
The Cost Of JavaScript in 2023
addyosmani
46
7k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Faster Mobile Websites
deanohume
305
30k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
For a Future-Friendly Web
brad_frost
175
9.4k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
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