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
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
みんなでプロポーザルを書いてみた
yuriko1211
0
260
Quine, Polyglot, 良いコード
qnighy
4
640
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
610
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
現場で役立つモデリング 超入門
masuda220
PRO
15
3.2k
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
200
どうして僕の作ったクラスが手続き型と言われなきゃいけないんですか
akikogoto
1
120
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
ヤプリ新卒SREの オンボーディング
masaki12
0
130
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
580
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Typedesign – Prime Four
hannesfritz
40
2.4k
GraphQLとの向き合い方2022年版
quramy
43
13k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Adopting Sorbet at Scale
ufuk
73
9.1k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Scaling GitHub
holman
458
140k
Visualization
eitanlees
145
15k
Faster Mobile Websites
deanohume
305
30k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
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