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

Mackerel の EventBridge 対応開発秘話

tatsuru
April 15, 2020

Mackerel の EventBridge 対応開発秘話

AWS SaaS コミュニティ Meet up 2020/04/15 オンラインでの登壇資料です。

tatsuru

April 15, 2020
Tweet

More Decks by tatsuru

Other Decks in Business

Transcript

  1. Mackerel ͷ
    EventBridge ରԠ։ൃൿ࿩
    גࣜձࣾ͸ͯͳɹ౉ล ى

    AWS SaaS ίϛϡχςΟ Meet up 2020/04/15 ΦϯϥΠϯ

    View full-size slide

  2. ࣗݾ঺հ
    • ౉ล ى id:wtatsuru @tatsuru

    • גࣜձࣾ͸ͯͳ

    • MackerelϓϩμΫτϚωʔδϟʔ

    • ܦྺ

    • 2011೥ɹΤϯδχΞͱͯ͠ೖࣾɻ͸ͯͳϒϩάͷΠϯϑϥߏஙɾӡ༻ͳͲ

    • Πϯϑϥج൫ͷӡ༻ɾ؅ཧ෦ॺͷϚωʔδϟʔ΋΍ͬͯ·͢

    View full-size slide

  3. ΞδΣϯμ
    • Mackerel ʹ͍ͭͯ

    • EventBridge ࿈ܞػೳͷ։ൃ

    • ϦϦʔεޙ

    View full-size slide

  4. Mackerel ʹ͍ͭͯ

    View full-size slide

  5. Mackerel ʹ͍ͭͯ
    • ͸ͯͳ͕։ൃ͢Δαʔό؂ࢹɾ؅ཧαʔϏε

    • ࣾ಺Ͱഓͬͨαʔόӡ༻ϊ΢ϋ΢Λఏڙ͢Δ

    • ਐԽ͠ଓ͚ΔαʔϏε

    • ϩʔϧ಺ҟৗݕ஌ɺcontainer-agent

    • AWS Advanced Technology Partner

    DevOps Competency

    • ʮAPN Technology Partner of the YearʯΛड৆ʂ

    View full-size slide

  6. Mackerel ʹ͍ͭͯ
    • AWS࿈ܞػೳ΋ॆ࣮ɻΦϯϓϨϛε͔ΒΫϥ΢υ·Ͱ౷߹ͯ͠؂ࢹ

    • AWSΠϯςάϨʔγϣϯͰϝτϦοΫ΍ΠϕϯτͷऔΓࠐΈ

    • EventBridge Ͱͷ௨஌࿈ܞ (New!)

    View full-size slide

  7. Mackerel ͷ௨஌ػೳ
    • Ξϥʔτ౳ͷΠϕϯτΛ֤छαʔϏε΁௨஌Ͱ͖Δ

    View full-size slide

  8. Mackerel ͷ௨஌ػೳ
    • Ξϥʔτ౳ͷΠϕϯτΛ֤छαʔϏε΁௨஌Ͱ͖Δ

    • Webhook Ͱͷ௨஌΋Մೳ

    • ௨஌Λड͚ͯͷΞΫγϣϯΛࣗಈԽ͢Δ

    • ΞϥʔτΛड͚ͯ࠶ىಈͨ͠ΓɺLB͔Β֎ͨ͠Γ

    • ௨஌ઃఆΛΑΓॊೈʹΧελϚΠζ͢Δ

    • ৄ͘͠͸ͪ͜Β΁ɿWebhookʹΞϥʔτΛ௨஌͢Δ - Mackerel ϔϧϓ

    https://mackerel.io/ja/docs/entry/howto/alerts/webhook

    View full-size slide

  9. Webhook ͷ͍࣋ͬͯͨ՝୊
    • ೚ҙͷΞΫγϣϯΛىͤͯ͜ΧελϚΠζͷ෯͕޿͍

    • ӡ༻؅ཧʹएׯͷίετ͕͔͔Δ

    • AWS ͳΒ API Gateway + Lambda Ͱड͚Δͷ͕ηΦϦʔ

    • ֎෦ʹड͚ޱΛઃ͚Δඞཁ͕͋Δ

    View full-size slide

  10. EventBridge ࿈ܞػೳͷ։ൃ

    View full-size slide

  11. Amazon EventBridge
    • 2019/07 ʹϩʔϯν͞ΕͨɺαʔόʔϨεΠϕϯτόεαʔϏε

    • AWS্ͰΠϕϯτͷ؅ཧΛߦͬͯ͘ΕΔ

    • औΓࠐΈͱ഑৴ɺηΩϡϦςΟɺঝೝɺΤϥʔॲཧ

    • Mackerel ։ൃνʔϜͰ΋౰͔࣌Βؾʹ͍ͯͨ͠

    View full-size slide

  12. ։ൃͷ͖͔͚ͬ
    • 2019೥ळࠒʹAWS༷͔Β঺հ͍ͨͩ͘

    • ࣾ಺Ͱ΋ར༻ྫͷগͳ͔ͬͨ EventBridge ࣗମ΁ͷཧղ͕ਐΜͩ

    • ։ൃΠϝʔδ΋͍ͭͨ

    • AWS্ͰαʔϏεల։͞Ε͍ͯΔ͓٬༷͔Βͷཁ๬͕͋ͬͨ

    • ࠓͳΒʮ೔ຊͰ࠷ॳʯͱ͍͏ΠϯύΫτΛૂ͑Δ

    View full-size slide

  13. ։ൃܾఆ
    • ௨஌͸Mackerelʹ͓͍ͯॏཁͳػೳ

    • Amazon EventBridge ʹΑΓ Webhook ௨஌ͷ࣋ͭ՝୊ΛҰ෦ղܾͰ͖Δ

    • Πϕϯτ؅ཧͷखܰ͞ɺηΩϡϦςΟ޲্Λૂ͑Δ

    • AWS্ͰαʔϏεల։͞Ε͍ͯΔ͓٬༷͸ଟ͍

    • Webhook ͰJSONΛૹ͓ͬͯΓɺಉ౳ػೳ͔ΒεϞʔϧελʔτ͢Δํ਑

    View full-size slide

  14. ։ൃλΠϜϥΠϯ
    • 2019/10 ޙ൒ υΩϡϝϯτΛ͍͍ͨͩͯ։ൃελʔτ

    • 2019/12/05 ࣾ಺ϦϦʔε

    • ࣾ಺ݶఆͰ։ൃ؀ڥͰͷࢼ༻

    • 2020/01/23 ػೳϦϦʔεࠂ஌

    • ࣮͸AWSίϯιʔϧ্ʹ͸΋͏ͪΐͬͱલʹग़͍ͯͨ

    • AWSίϯιʔϧ্Ͱग़ΔλΠϛϯάʹ߹ΘͤͯMackerelଆ΋ϦϦʔε

    View full-size slide

  15. ։ൃऀ͔Βͷ੠
    • ϝΠϯͷΤϯδχΞ1໊

    • νʔϜʹjoinͯ͠࠷ॳͷେ͖ͳػೳ։ൃͩͬͨ

    • υΩϡϝϯτ͸ஸೡͰɺجຊతʹ͸ͦΕΛಡΊ͹࡞Εͨ

    • αʔϏεఏڙऀɾΫϥΠΞϯτͷ΍ΓऔΓϑϩʔ͕ஸೡ

    • AWSίϯιʔϧ্Ͱग़Δ͓͓ΑͦͷλΠϛϯά͸ฉ͍͍͕ͯͨɺٸʹग़ͯ
    ͼͬ͘Γͨ͠

    View full-size slide

  16. ֤ॴͰ࿐ग़ػձ͕͋ͬͨ
    • ೔ຊͷSaaSͰ࠷ॳͷϦϦʔε

    • AWS༷ͷϒϩάͰ΋औΓ্͍͍͛ͯͨͩͨ

    • Black Belt Online ηϛφʔʹ΋ొ৔ʢʂʣ

    • ޙ೔ Lambda ͷίϯιʔϧʹ΋ొ৔ʢ!!ʣ

    • Α͘࢖ΘΕΔ৔ॴʹ࿐ग़͕૿͑ͯ͏Ε͍͠

    View full-size slide

  17. ػೳ໘ͷͦͷޙ
    • EventBridge ࿈ܞػೳ͸ঃʑʹ࢖ΘΕΔΑ͏ʹͳ͖ͬͯͨ

    • EventBridge ࣗମ͸ࣾ಺Ͱ΋ঃʑʹೝ஌͞Εͭͭ͋Δ

    • ཁ๬΋ग़͓ͯΓɺվળݕ౼த

    • EventBridge ܦ༝Ͱͷ༻్ʹ߹Θͤͯ

    • ঃʑʹ Webhook ͷ֦ுͱ͍͏ϙδγϣϯ͸୤͍ͯ͘͠

    View full-size slide

  18. ৼΓฦΓ
    • ೔ຊͰ࠷ॳͱ͍͏ΠϯύΫτΛग़ͤͨ

    • ࣍͸ੈքͰ࠷ॳΛૂ͍͍ͨ

    • AWSͱMackerelΛ࢖͏ํͷͪΐͬͱͨ͠ෆศΛղফͰ͖ͨ

    • AWSͰ͸ʮͪΐͬͱͨ͠ෆศʯΛղফ͢ΔਐԽ͕Α͘ى͖Δ

    • Mackerel ΋AWSͷਐԽʹ߹ΘͤɺਐԽ͍ͯ͘͠

    View full-size slide