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

Mackerel at ENOG

soudai sone
October 29, 2017

Mackerel at ENOG

ENOG47 Meeting でMackerelについて話をした時の資料です

http://enog.jp/archives/1708

soudai sone

October 29, 2017
Tweet

More Decks by soudai sone

Other Decks in Technology

Transcript

  1. 1
    04͔ΒωοτϫʔΫ·Ͱ؆୯ՄࢹԽʂ
    ग़དྷΔɺ.BDLFSFMʂʂ
    &/0(.FFUJOH

    View full-size slide

  2. 3
    • ીࠜ ૖େ JE4PVEBJ

    • גࣜձࣾ ͸ͯͳ
    • .BDLFSFMνʔϜ
    • $VTUPNFS3FMJBCJMJUZ&OHJOFFS
    ٕज़Ͱօ༷ͷ໰୊Λղܾ͢Δ͓࢓ࣄͰ͢
    ࣗݾ঺հ

    View full-size slide

  3. 4
    ࠓ೔ͷΰʔϧ
    ΞϓϦέʔγϣϯ
    ϛυϧ΢ΣΞɾ04ɾωοτϫʔΫ
    ςΩετɾϩά
    αʔϏε

    View full-size slide

  4. 5
    ࠓ೔ͷΰʔϧ
    ΞϓϦέʔγϣϯ
    ϛυϧ΢ΣΞɾ04ɾωοτϫʔΫ
    ςΩετɾϩά
    αʔϏε

    View full-size slide

  5. 6
    ύϑΥʔϚϯεϞχλϦϯά͸৬ਓܳ
    ࠓ೔ͷΰʔϧ

    View full-size slide

  6. 7
    ৬ਓͷͨΊʹ࠷ߴͷαʔϏεΛʂ
    ࠓ೔ͷΰʔϧ

    View full-size slide

  7. 8
    ͦ͜Ͱʂʂ
    ࠓ೔ͷΰʔϧ

    View full-size slide

  8. 9
    04͔ΒωοτϫʔΫ·Ͱ
    .BDLFSFMͰՄࢹԽʂ
    ࠓ೔ͷΰʔϧ

    View full-size slide

  9. 10
    .BDLFSFMͱ͸
    .BDLFSFMͷ࢖͍ํʢσϞʣ
    ࢖͍ͨ͘ͳΔ.BDLFSFMͷ5JQT
    ·ͱΊ
    ࠓ೔ͷΞδΣϯμ

    View full-size slide

  10. 11
    .BDLFSFMͱ͸
    .BDLFSFMͷ࢖͍ํʢσϞʣ
    ࢖͍ͨ͘ͳΔ.BDLFSFMͷ5JQT
    ·ͱΊ
    ࠓ೔ͷΞδΣϯμ

    View full-size slide

  11. 12
    ௚ײతͳϢʔβʔମݧ

    View full-size slide

  12. 13
    ΞʔΩςΫνϟ
    Mackerel͔Β
    ֎෦αʔϏε
    ΁ͷ௚઀؂ࢹ
    ΤʔδΣϯτ͔Β
    ϝτϦοΫΛ౤ߘ
    HTTPS REST API

    View full-size slide

  13. 14
    SSL証明書の有効期限を監視
    • SSL証明書の有効期限までの日数が、Warning条件, Critical条件それぞ
    れに設定された日数を下回った際にアラートが通知されます。

    View full-size slide

  14. 15
    μογϡϘʔυπʔϧ

    View full-size slide

  15. 16
    .BDLFSFMͱ͸
    .BDLFSFMͷ࢖͍ํʢσϞʣ
    ࢖͍ͨ͘ͳΔ.BDLFSFMͷ5JQT
    ·ͱΊ
    ࠓ೔ͷΞδΣϯμ

    View full-size slide

  16. 17
    ؆୯ɻ͙͢ ͸͡ΊΒΕ·͢
    • ΨΠυʹ͕ͨͬͯ͠ίϚϯυΛ࣮ߦ͢Δ͚ͩ
    • ਺෼͋Ε͹े෼Ͱ͢
    mackerel-agent written in Go

    View full-size slide

  17. 18
    • MPBEBWH
    • DQV
    • NFNPSZ
    04ͷϞχλϦϯά
    • EJTL
    • JOUFSGBDF
    • GJMFTZTUFN
    γεςϜʹؔΘΔϝτϦοΫ

    View full-size slide

  18. 19
    ͨ͘͞Μͷ؂ࢹαϙʔτ
    ɾॆ࣮ͨ͠ެࣜϓϥάΠϯ
    ɾਓؾͷOSSπʔϧϓϥάΠϯ΋ར༻Մೳ
    ˠ ѹ౗తଟ਺ͷ؂ࢹʹରԠ
    ɾࣗ࡞ϓϥάΠϯͰ؆୯ʹ؂ࢹ߲໨Λ֦ு

    View full-size slide

  19. 20
    ϞχλϦϯά͓ͯ͘͜͠ͱͰཧ༝͕Θ͔Δ

    View full-size slide

  20. 21
    άϥϑΞϊςʔγϣϯ
    • αʔϏεશମ΍ϩʔϧʹؔΘΔ༷ʑͳࣄ৅Λొ࿥Մೳ
    • ࣌ܥྻσʔλʔͱͷ૬ؔΛ೺Ѳ͠΍͘͢
    • ͳͥෛՙ্͕͕ͬͨͷ͔ʁ
    • ΞϓϦέʔγϣϯ%FQMPZ
    • ϏδωεΩϟϯϖʔϯ
    • "1*΍(6*͔Β؆୯ʹొ࿥

    View full-size slide

  21. 22
    ࣮༻ੑͷߴ͍ΠϯλʔϑΣʔε
    API
    CLI
    GUI
    User App

    View full-size slide

  22. 23
    .BDLFSFMͱ͸
    .BDLFSFMͷ࢖͍ํʢσϞʣ
    ࢖͍ͨ͘ͳΔ.BDLFSFMͷ5JQT
    ·ͱΊ
    ࠓ೔ͷΞδΣϯμ

    View full-size slide

  23. 24
    ॊೈͳάϥϑදݱʢܭࢉࣜʣ
    ࠩ෼
    લिͱͷॏͶ͋Θͤ
    ࠷େ
    ࠷େɾฏۉɾ࠷খ
    ߹ܭ

    View full-size slide

  24. 25
    কདྷ༧ଌ
    • աڈͷ܏޲Λ෼ੳ͠ɺকདྷͷ༧ଌʹج͍ͮͯܯࠂ
    • ྫ͑͹ɺσΟεΫ͕ރׇ͢Δ1ϱ݄લʹ͓஌Βͤ͢Δ͜ͱ΋
    Critical > 80%
    কདྷ
    Trends
    1ϱ݄લ
    ݱࡏ

    View full-size slide

  25. 26
    ϝλσʔλػೳ
    wϗετͳͲͷ೚ҙͷཁૉʹKey-Value஋Ληοτ͠࠶ར༻
    wࢿ࢈؅ཧ൪߸
    wRI৘ใ
    wΠϯετʔϧ͞Εͨύοέʔδ৘ใ
    wͳͲͳͲ
    API,CLI,Plugin...
    CREATE
    READ
    UPDATE
    DELETE
    {
    "type": 12345,
    "region": "jp",
    "env": "staging",
    "instance_type": "c4.xlarge"
    }
    {
    "type": 12345,
    "region": "jp",
    "env": "staging",
    "instance_type": "c4.xlarge"
    }
    Host / Administrator

    View full-size slide

  26. 27
    • .BDLFSFMͷΠϯϕϯτϦ৘ใ͸ɺݶΓͳ͘઱౓͕ߴ͍ҝɺ৴པੑ
    ͷߴ͍୆ாͱͯ͠ར༻Ͱ͖·͢
    ௠෗Խ͠ͳ͍αʔόʔ؅ཧ
    ؂ࢹσʔλͱͯ͠ৗʹߋ৽
    Host1 10.0.0.11
    Host2 10.0.0.12
    Host3 10.0.0.13
    Host4 10.0.0.14
    .....
    ਖ਼͍͠αʔόʔ؅ཧ୆ா

    View full-size slide

  27. 28
    ϗετ؅ཧͱͯ͠ͷ.BDLFSFM
    • ͓࢖͍ͷπʔϧͱ࿈ܞ͠ɺ༻్ʹԠͯ͡૊Έ߹ΘͤΔ͜ͱ͕Ͱ͖
    ·͢
    Server
    Server
    Server
    Server
    Deploy
    Configuration
    API
    mkr

    View full-size slide

  28. 29
    # mkr monitors diff
    Summary: 1 modify, 0 append, 0 remove
    {
    "name": "loadavg",
    "type": "host",
    "metric": "loadavg5",
    "operator": ">",
    "warning": 2.000000,
    - "critical": 4.000000,
    + "critical": 5.000000,
    "duration": 5,
    "url": "",
    "scopes": [
    "stanaka: client",
    ],
    "excludeScopes": [
    ],
    },
    JSON JSON JSON
    pull diff push
    ؂ࢹઃఆΛίʔυͰ؅ཧ
    • GitϥΠΫͳ࢖͍উख

    View full-size slide

  29. 30
    .BDLFSFMͱ͸
    .BDLFSFMͷ࢖͍ํʢσϞʣ
    ࢖͍ͨ͘ͳΔ.BDLFSFMͷ5JQT
    ·ͱΊ
    ࠓ೔ͷΞδΣϯμ

    View full-size slide

  30. 31
    ύϑΥʔϚϯεϞχλϦϯάΛָ͠Ή
    ·ͱΊ

    View full-size slide

  31. 32
    ύϑΥʔϚϯεϞχλϦϯά͸೰·͍͠
    ·ͱΊ

    View full-size slide

  32. 33
    ύϑΥʔϚϯεϞχλϦϯά͸೰·͍͠
    ·ͱΊ
    εύΠΫͳͷ͔ɺগ্ͮͭ͠ঢͨ͠ͷ͔͸࣌ܥྻσʔλ͕ඞཁ

    View full-size slide

  33. 34
    ύϑΥʔϚϯεϞχλϦϯά͸೰·͍͠
    ·ͱΊ
    εύΠΫͳͷ͔ɺগ্ͮͭ͠ঢͨ͠ͷ͔͸࣌ܥྻσʔλ͕ඞཁ
    աڈͷσʔλ͸औΔ͜ͱ͕ग़དྷͳ͍
    ͔ͩΒͦ͜໰୊͕ى͜Δલ͔ΒϞχλϦϯά͢Δࣄ͕େࣄ

    View full-size slide

  34. 35
    ϞχλϦϯάͷ஌ݟΛ.BDLFSFM͕ڞ༗͢Δ
    ·ͱΊ

    View full-size slide

  35. 36
    1MVHJOʹΑΔऩू͢΂͖ϝτϦοΫͷछྨ
    ϩʔϧʹΑΔαʔόͷ·ͱΊํ
    άϥϑΞϊςʔγϣϯ΍άϥϑϘʔυʹΑΔ
    Θ͔Γ΍͍͢ϝτϦοΫͷݟํ
    ʜ FUD
    .BDLFSFM͕ڞ༗͢Δ஌ݟ

    View full-size slide

  36. 37
    ҰาਐΜͩ.BDLFSFMͷར༻๏
    .BDLFSFMͰ৽ͨͳੈքΛ

    View full-size slide

  37. 38
    ؾʹͳΔํ͸.BDLFSFMຊ

    View full-size slide

  38. 39
    .BDLFSFMϢʔβʔάϧʔϓ͕ൃ଍͠·ͨ͠
    Mackerelユーザの皆さんが発起人となり、ユーザーグループが発足しました。
    それに伴い、新しくブログが開設されました。
    http://mackerel-ug.hatenablog.com/entry/2016/06/07/111850
    ユーザーグループ用のSlackチームも運用がはじまっており、下記URLよりどなたでもご参加で
    きます。
    https://mackerel-ug-slackin.herokuapp.com/
    ぜひご参加いただき、意見交換などにご利用ください。

    View full-size slide

  39. 40
    Έͳ͞Μ΋Ұॹʹָ͠Έ·͠ΐ͏ʂ
    ·ͱΊ

    View full-size slide

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

    View full-size slide