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

MackerelでECS on Fargate 監視してみた

MackerelでECS on Fargate 監視してみた

Cloud Native Okinawa #02 のLTです!

NakanishiTetsuhiro

August 23, 2019
Tweet

More Decks by NakanishiTetsuhiro

Other Decks in Technology

Transcript

  1. Mackerel ͰECS on Fargate ؂ࢹͯ͠Έͨ גࣜձࣾRe:Build
 ͯͭ (Twitter: @kaoru6strings) 2019೥08݄23೔ʢۚʣ

    Cloud Native Okinawa #02 https://cnjp.connpass.com/event/139805/
  2. ࣗݾ঺հ • த੢ ఩େʢͯͭʣ • גࣜձࣾRe:Buildॴଐ • ࠷ۙ͸Nuxt.jsͱ؂ࢹʹڵຯ͕͋Γ·͢ • @kaoru6strings

  3. ٕज़ؔ࿈ͷεΩϧηοτ Ͱ͖Δ ͪΐͬͱͰ͖Δ ษڧத ϑϩϯτΤϯυ +4  7VFKT /VYUKT 

    K2VFSZ όοΫΤϯυ -BSBWFM  3VCZPOSBJMT 1ZUIPO Πϯϑϥ %PDLFS  -JOVY  "84  7JSUVBM#PY  7BHSBOU .BDLFSFM ,VCFSOFUFT
 ($1
  4. None
  5. ؂ࢹ͕޷͖͔ʔʂʁ

  6. None
  7. Զ͸؂ࢹ͕޷͖ͩʔʂʁ

  8. ಡΈ࢝Ί·ͨ͠

  9. https://speakerdeck.com/nakanishitetsuhiro/ ben-fan-huan-jing-woecstegou-zhu-sitahua ECS ຊ൪ӡ༻͸͡·Γ·ͨ͠

  10. ฐࣾ΋؂ࢹͷ࢓૊Έ͍Εͳ͖Όͳ…

  11. ࠓճ͸؂ࢹͷ͓͸ͳ͠

  12. ؂ࢹͱ͸ • https://www.google.com/search?client=firefox-b- d&q=%E7%9B%A3%E8%A6%96%E3%81%A8%E3 %81%AF

  13. ຊ൪ӡ༻্͍ͯ͘͠Ͱ͸ඞਢͷ΋ͷ

  14. ͦ΋ͦ΋ͳͥ؂ࢹΛ͢Δͷ͔ • ӡ༻ɾอकΛ্͍ͯ͘͠Ͱͷ൑அࡐྉͱͯ͠ σʔλΛूΊΔ • ʮࣗ෼͕஌Βͳ͍͏ͪʹαʔόʔ͕ࢮΜͰ·͠ ͨʯΛͳ͘͢ • ղܾ͠ͳ͚Ε͹͍͚ͳ͍໰୊͸ଟذʹΘͨΔͨ Ίɺ͜͜Ͱݴ͏ʮ؂ࢹʯͷҙຯ͸ඇৗʹᐆດ

  15. ࠓճ؂ࢹ͢Δ͜ͱʹ߲ͨ͠໨ • ࢮ׆؂ࢹ • CPU usage • Memory usage •

    Interface: ωοτϫʔΫଳҬͷ઎༗౓
  16. ๻͕ࢥ͏Mackerelͷ͍͍ͱ͜Ζ • ؆୯ηοτΞοϓ • ΞϓϦέʔγϣϯΤϯδχΞͷ๻Ͱ΋࢖͑Δ • ECSͱͷ౷߹͕؆୯

  17. MackerelͰAWS ECSΛ؂ࢹ͢ Δํ๏ 1. mackerel-container-agentͷίϯςφΛECS ͷλεΫʹఆٛ͢Δ https://mackerel.io/ja/docs/entry/howto/install-agent/container/ecs 2. AWSΠϯςάϨʔγϣϯػೳΛ࢖ͬͯ؂ࢹ͢Δ https://mackerel.io/ja/docs/entry/integrations/aws

  18. None
  19. AWSΠϯςάϨʔγϣϯࢼ͔͢… https://gamebiz.jp/?p=246869

  20. ࠓճͷো֐Ͱಘͨڭ܇ 1. ؂ࢹͷ࢓૊Έ͸ผϕϯμʔ΋͘͠͸ΦϯϓϨ ͰͨͯΔ 2. ϕϯμʔΛ·͍ͨͰͷ৑௕Խ͸ݱঢ়೉͍͖͠ ͕͢Δ 3. ࠓճͷྫͰ͍͏ͱผϦʔδϣϯʹ৑௕Խͯ͠ ͓͘ͷ͕٢ʢͳ͓ۚ͸͔͔Δ໛༷ʣ

  21. ηϧϑ࣭໰ίʔφʔ • MackerelͰECS΋͘͠͸ผͷαʔϏεͳͲͷ ίϯςφΛ؂ࢹͯ͠Δਓ͍·͔͢ʁʁ • mackerel-container-agentΛECSλεΫ಺ʹೖ Εͯ࢖͏ͱλεΫͷߋ৽͕͔͔Δͨͼʹϗε τ͕role͔Βআ֎͞ΕΔ

  22. ൪֎ฤ ࣮ࡍECSӡ༻ͯ͠ΈͯͲ͏Αʁ

  23. ECS࢖ͬͯΈͯͷײ૝ • εέʔϧΞ΢τ͢Δͷʹ͕͔࣌ؒͳΓ͔͔Δ ͨΊɺॠؒతʹେن໛ͳτϥϑΟοΫ͕དྷͨ Βແࣄࢮ๢ͨ͠ • ؆୯ʹϩʔϦϯάΞοϓσʔτͰ͖Δ • ׳ΕͨΒEC2Ͱαʔόʔӡ༻͍ͯͨ͠ͱ͖ΑΓ શવָ

  24. ECS࢖ͬͯΈͯͷײ૝ • খن໛ͳγεςϜͷຊ൪؀ڥʹ͸େ෼ྑ͍ʂ • ͔͘ͳΔ্͸Ұ୴k8s • GCPͷαʔϏε΋Ұ௨Γ৮ͬͯΈͨ͘ͳͬͨ

  25. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠