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/

    View full-size slide

  2. ࣗݾ঺հ
    • த੢ ఩େʢͯͭʣ
    • גࣜձࣾRe:Buildॴଐ
    • ࠷ۙ͸Nuxt.jsͱ؂ࢹʹڵຯ͕͋Γ·͢
    • @kaoru6strings

    View full-size slide

  3. ٕज़ؔ࿈ͷεΩϧηοτ
    Ͱ͖Δ ͪΐͬͱͰ͖Δ ษڧத
    ϑϩϯτΤϯυ
    +4
    7VFKT
    /VYUKT
    K2VFSZ
    όοΫΤϯυ
    -BSBWFM
    3VCZPOSBJMT
    1ZUIPO
    Πϯϑϥ
    %PDLFS
    -JOVY
    "84
    7JSUVBM#PY
    7BHSBOU
    .BDLFSFM
    ,VCFSOFUFT

    ($1

    View full-size slide

  4. ؂ࢹ͕޷͖͔ʔʂʁ

    View full-size slide

  5. Զ͸؂ࢹ͕޷͖ͩʔʂʁ

    View full-size slide

  6. ಡΈ࢝Ί·ͨ͠

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  13. ࠓճ؂ࢹ͢Δ͜ͱʹ߲ͨ͠໨
    • ࢮ׆؂ࢹ
    • CPU usage
    • Memory usage
    • Interface: ωοτϫʔΫଳҬͷ઎༗౓

    View full-size slide

  14. ๻͕ࢥ͏Mackerelͷ͍͍ͱ͜Ζ
    • ؆୯ηοτΞοϓ
    • ΞϓϦέʔγϣϯΤϯδχΞͷ๻Ͱ΋࢖͑Δ
    • ECSͱͷ౷߹͕؆୯

    View full-size slide

  15. 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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide