Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Prometheusで監視・モニタリング #hackt

Prometheusで監視・モニタリング #hackt

Manabu Matsuzaki

September 11, 2016
Tweet

More Decks by Manabu Matsuzaki

Other Decks in Programming

Transcript

  1. ࣗݾ঺հ • ໊લɿ দ࡚ ֶ • Twitterɿ @matsumana • ৬ۀɿ

    ιϑτ΢ΣΞΤϯδχΞ
 ʢϓϩάϥϚɺWebαʔϏεӡ༻ʣ
  2. ݱࡏԿΛ࢖ͬͯ·͔͢ʁ • Nagios • Ganglia • Munin • Cacti •

    Zabbix • AWS CloudWatch • Datadog • Mackerel • New Relic • ͦΕҎ֎
  3. Prometheusͱ͸ • SoundCloud͕ࣾ։ൃ͠ɺOSSͱͯ͠ެ։͍ͯ͠Δ؂ࢹɾϞχλϦϯάπʔϧ • ࠷ॳͷcommit͸2012/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໊
  4. Prometheusͷػೳ • time series database (࣌ܥྻσʔλϕʔε) • ϝτϦΫεऩू & อଘ

    • อଘͨ͠ϝτϦΫεʹର͢ΔΫΤϦ • ͖͍͠஋Λઃఆͯ͠ΞϥʔτΛඈ͹͢ • μογϡϘʔυ
  5. ͦͷଞͷಛ௃ • golangͰॻ͔Ε͍ͯΔ • pullܕ
 ؂ࢹର৅ϊʔυʹexportorΛΠϯετʔϧͯ͠Prometheus͔ΒϙʔϦϯά • Grafanaͱ࿈ܞՄೳ • PrometheusࣗମʹPromDashͱ͍͏μογϡϘʔυπʔϧ͕͋Δ͕ɺ

    Grafanaͱͷ࿈ܞ͕ਪ঑ • CNCF(Cloud Native Computing Foundation)ͷϓϩδΣΫτʹͳͬͨ • Kubernetesͱ౷߹Մೳ
 ※ͱ͸ݴͬͯ΋Docker༻Ͱ͸ͳ͍ͷͰɺ΋ͪΖΜΦϯϓϨͰ΋࢖͑Δ
  6. pros • Grafanaͱ࿈ܞग़དྷΔ • ΫΤϦ͕ॻ͚Δ • αʔόεϖοΫ΍ϝτϦΫε਺ʹΑΔͱࢥ͏͕
 1୆ͷαʔόͰ୔ࢁͷϊʔυΛ؂ࢹͰ͖ΔΒ͍͠ • 1୆ͷαʔόͰ3,000ϊʔυ͘Β͍؂ࢹग़དྷΔΒ͍͠

    • AWSͷ৔߹ɺ50ʙ100ϊʔυ͘Β͍ͳΒαʔόεϖοΫ͸ t2.medium(CPU: 2Core, Mem: 4GB)Ͱे෼Β͍͠ • exportor͕๛෋ɻ΋͠ཉ͍͠΋ͷ͕ແ͚Ε͹؆୯ʹ࡞ΕΔ
  7. ଞͷπʔϧͱͷൺֱ • ྫ͑͹Zabbixͱൺֱ͢ΔͱɺͲΜͳײ͡ʁ • γϯϓϧ ʘ(^o^)ʗ • ίϯϙʔωϯτ͕ૄ݁߹ͳͷ͸ɺ
 1ͭͷαʔϏεͰ਺ϊʔυ؂ࢹ͢Δ͚ͩͳΒZabbixͷ༷ͳ
 ΦʔϧΠϯϫϯͷํ͕͍͍͔΋

    (´ɾωɾʆ) • WebUIͰઃఆग़དྷͳ͍ (´ɾωɾʆ) • ϝϯςφϯε͕࣌ؒઃఆग़དྷͳ͍ (´ɾωɾʆ) • Ξϥʔτૹ৴ઌϝʔϧΞυϨεͷઃఆ͕ࡉ͔͘ग़དྷͳ͍ (´ɾωɾʆ)
  8. Α͘࢖͍ͦ͏ͳ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
  9. ϦϯΫू • ΦϑΟγϟϧ • 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