Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
/Mackerel 20190312
Search
mackerelio
March 12, 2019
0
89
/Mackerel 20190312
mackerelio
March 12, 2019
Tweet
Share
More Decks by mackerelio
See All by mackerelio
Mackerelが取り組むオブザーバビリティ - Mackerel Tech Day
mackerelio
0
470
Mackerelの2023年ふりかえりと 今後のロードマップ
mackerelio
0
960
Mackerel開発者が使ってほしいAWSインテグレーションの機能4選
mackerelio
0
53
Mackerelの現在と未来 2023 / Mackerel Drinkup #10
mackerelio
0
160
次世代Mackerelの アーキテクチャ / Mackerel Meetup #14 Next Generation Architecture
mackerelio
0
2.2k
Mackerelの現在と未来 2023 / Mackerel Meetup #14
mackerelio
0
2.1k
【講演資料】クラウド運用事業の成長を支援!MackerelではじめるMSP_20210427
mackerelio
0
140
オンラインセミナー資料「はじめてのMackerel 〜アラートの洪水から脱出! Mackerel流の通知活用法〜」20210303
mackerelio
0
100
はじめてのMackerel ~ クラウド監視入門編 ~ 20210225
mackerelio
0
73
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
GitHub's CSS Performance
jonrohan
1030
460k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
4 Signs Your Business is Dying
shpigford
180
21k
Writing Fast Ruby
sferik
627
61k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Site-Speed That Sticks
csswizardry
0
25
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Designing for humans not robots
tammielis
250
25k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
GraphQLとの向き合い方2022年版
quramy
43
13k
Transcript
1 2019/03/12 mackerel.io
2 ࣗݾհ • Ճݹ ݾʢJEOLBLPʣ • גࣜձࣾͯͳ ϓϩσϡʔαʔ • .BDLFSFMνʔϜͷࣄۀऀΛ୲͍ͯ͠·͢ʂ
ܦྺ 4*FSͰωοτϫʔΫΤϯδχΞ ϕϯνϟʔͰӦۀཧ৬Λ୲ɺ*10Λܦݧ 0SBDMFͰΫϥυʢ*BB4ʣΛ୲ ͯͳ ϏδωεϚωʔδϟʔ ͯͳ ϓϩσϡʔαʔ
3 ձࣾհ ໊ࣾɿגࣜձࣾͯͳ ॴࡏɿ ຊࣾ ˟ژژࢢதژ۠ޚ௨ؒ೭ொ౦ೖߴٶொޚϏϧ' ɿ ຊళ ˟౦ژߓ۠ೆ੨ࢁ੨ࢁαϯϥΠτϏϧ' ઃཱɿ݄
ࢿຊۚɿ ઍԁ ച্ߴɿ ඦສԁʢ݄ݱࡏʣ ैۀһɿਓʢ݄ݱࡏʣ ʹ౦ূϚβʔζࢢʹ্
4 ͯͳͷϛογϣϯ ʮΔʯʮͭͳ͕Δʯʮදݱ͢Δʯ Ͱ৽͍͠ମݧΛఏڙ͠ɺਓͷੜ׆Λ๛͔ʹ͢Δ
5 .BDLFSFMͱʁ
6 ࠷ߴͷυοάϑʔσΟϯάڥ͔Βੜ·Ε·ͨ͠ ॳ/BHJPTΛͬͯαʔόཧΛ࣮ࢪ ଟ͗͢Δࢹରࢹ߲͕ɺ ૿͑ଓ͚ΔΠϯϑϥӡ༻ͷෛՙʹ ྲྀಈతͳΠϯϑϥʹରԠ͢ΔΛϞοτʔʹࣗࣾࢹπʔϧΛ࡞։࢝ ʢॳ.BDLFSFMͷੜʣ ཧαʔόʢԾԽ͠ʣʴ "84ͷΫϥυར༻࢝·Γ৽ڥʹ దͨ͠.BDLFSFM͕ੜ
Ϋϥυͷຊ֨ීٴΛड͚ɺΑΓ͍উखͷྑ͍πʔϧͱͯ͠4BB4ܕࢹαʔϏεͱͯ͠ ൛.BDLFSFMϦϦʔεʹணख Ҏલ ʙ ʙ ʙ ࣌ͷ.BDLFSFM ొϢʔβʔ ສਓ ݄ؒϢχʔΫϒϥβ ԯਓΛތΔͯͳͷαʔϏ εʢͯͳϒοΫϚʔΫɺͯͳϒϩάͳͲʣ.BDLFSFMʹΑͬͯࢧ͑ΒΕ͍ͯ·͢ɻ
7 ΤϯδχΞΛऔΓר͘ڥ ɾ·͢·͢ಈతͰศརʹͳΔΠϯϑϥετϥΫνϟʔ ɾޮతʹෳࡶੑͱ͖߹͏͜ͱ͕ٻΊΒΕΔ
8
9 DevOpsͷத֩ͱͯ͠ Mackerel୯ͳΔࢹαʔϏεͰ͋Γ·ͤΜ ༷ʑͳΈͱ؆୯ʹΈ߹Θͤɺ։ൃӡ༻ϥΠϑαΠΫϧͷ த֩ͱͯ͠ޮԽΛଅਐ͠·͢ Dev Ops
10 DevOps
11 ͯͳͰͷ%FW0QT
12 DevOpsͷఆٛ • EFWPQTͱͷߟ͑ํͰ͋ΓɺࣄͷਐΊํͰ͋Δʢ˞ʣ • ͯͳͰπʔϧΛࢦͨ͠ΓɺΧϧνϟʔΛࢦͨ͠Γଟٛత ͳ༻ޠͱ͍͏ೝࣝΛ͍ͯ͠·͢ • %FW0QTͷจ຺ͰޠΒΕΔπʔϧ͝Ζ͔Βಋೖ ʢQVQQFUͳͲʣ
˞ॻ੶ʮ&GGFDUJWF%FW0QTʯΑΓҾ༻
13 ݩʑͷ৫ମ੍ͱׂ αʔϏεɾγεςϜ։ൃຊ෦ ୈ̍ʙୈ̑άϧʔϓ γεςϜ ϓϥοτϑΥʔϜ෦ %FW 0QT ΞϓϦέʔγϣϯΤϯδχΞ ˠΞϓϦέʔγϣϯɾαʔϏε։ൃ
ΦϖϨʔγϣϯΤϯδχΞ ˠΠϯϑϥج൫ͷߏஙʴӡ༻
14 DevOps • զʑ͕ײ͍ͯͨ͡՝ ΦϖϨʔγϣϯΤϯδχΞ͕ԣ۲ͰରԠ͢Δࣄ͕ۀͷϘτϧωοΫʹ Πϯϑϥӡ༻ۀͷͷ͔ͨΑΓ ։ൃνʔϜ͕ʮΠϯϑϥΦʔφʔγοϓʯΛ࣋ͭͱ͍͏ߟ͑ํʹม͑ͨ
15 ׂͷมߋʢ৽ʣ αʔϏεɾγεςϜ։ൃຊ෦ ୈ̍ʙୈ̑άϧʔϓ γεςϜ ϓϥοτϑΥʔϜ෦ %FW 0QT ΞϓϦέʔγϣϯΤϯδχΞ ΦϖϨʔγϣϯΤϯδχΞ
ΠϯϑϥΦʔφʔγοϓΛͭ ωοτϫʔΫڞ௨ج൫ʹઐ೦ɾྗ
16 ΦʔφʔγοϓΛͭ ΠϯϑϥΦʔφʔγοϓͱʁ ΞϓϦέʔγϣϯΤϯδχΞ͕ΠϯϑϥྖҬ·ͰΛ ࣋ͪɺোରԠ͕Ͱ͖ͨΓɺඞཁͳ։ൃڥͷߏஙɺຊ ൪ͷೖΛࣗͨͪͷஅͰ͓͜ͳ͑ΔΑ͏ͳঢ়ଶɻ
17 ΦʔφʔγοϓΛਪਐ͢ΔͨΊʹͬͨ͜ͱ • $50͔Βͷϝοηʔδϯά • ٕज़ษڧձɺϋοΧιϯʢΠϯϑϥྖҬεΩϧͷ֫ಘʣ • ΣϒΦϖϨʔγϣϯΤϯδχΞ͔Β43&৬छมߋͯ͠ ։ൃνʔϜઐଐஔʢΦʔφʔγοϓͷਪਐʣ •
Πϯϑϥͷ͍߹ΘͤνϟϯωϧΛ࡞ͬͨʢBTLJOGSBʣ
18 ͯͳͷதͰͷMackerel • ʮΘ͔Βͳ͍ʯ͜ͱΛʮΘ͔ΔʯΑ͏ʹ͢Δπʔϧ • .BDLFSFMͷΞϥʔτΛݟͳ͕Βɺى͖ͨোͱରࡦͷਐḿ ֬ೝͳͲΛΞϓϦέʔγϣϯΤϯδχΞͱ43&͕Ұॹʹ νΣοΫ • ʮ/8ʯʮαʔόʯͰ͚Δ͜ͱͳ͘ʮϩʔϧʯͱ͍͏֓
೦ͰϚοϐϯά • ڞ௨ݴޠΛ࣋ͭ • Ұॹʹվળ͢ΔจԽΛৢ • ΞϓϦέʔγϣϯɾΠϯϑϥ྆ࢹ ͔ΒΑΓޮՌతͳվળࡦΛબ ͢Δ ΞϓϦέʔγϣϯ ΤϯδχΞ 43&
19 ϩʔϧ͕࠷ߴͷརศੑΛ ༧ΊαʔϏεʗϩʔϧʗϗετΛࢦఆ͢Δ͜ͱͰɺࣗಈతʹάϥ ϑࢹઃఆͳͲ͕ઃఆ͞ΕΔͨΊɺಛʹେنڥͰͷӡ༻ෛ ՙܰݮʹޮՌతͰ͢
20 ͯͳͰ׆༻͍ͯ͠Δπʔϧ܈
21 جຊػೳ
22 ΞʔΩςΫνϟ Mackerel͔Β ֎෦αʔϏε ͷࢹ ΤʔδΣϯτ͔Β ϝτϦοΫΛߘ HTTPS REST API
23 ؆୯ɻ͙͢ ͡ΊΒΕ·͢ • ΨΠυʹ͕ͨͬͯ͠ίϚϯυΛ࣮ߦ͢Δ͚ͩ • ͋ΕेͰ͢ • ΤʔδΣϯτ͕ࢮ׆ࢹΛࣗಈతʹ։࢝ •
ΤʔδΣϯτ͕ϦιʔεͷϝτϦΫεΛࣗಈऔಘ mackerel-agent written in Go
24 ཏతͳϝτϦΫεɾࢹϧʔϧ ɾ63-֎ܗࢹϗετࢮ׆ࢹϦιʔεࢹϩάࢹ ɾ"84"[VSFΦʔτεέʔϧରԠ ɾࣗ࡞ϓϥάΠϯͱͷ࿈ܞ • ѹతଟͷࢹʹରԠ • ଞࢹπʔϧ͔ΒͷҠߦࣄྫଟʂ
25 ࢹϧʔϧͷઃఆඞཁ • ϞχλϦϯάʹ͓͚Δ՝ • ࢹϧʔϧͷϝϯςφϯε ॏཁ͕ͩख͕͔͔ؒΔ • ੩తͳᮢͷࢹ͚ͩͰݕ ग़͕͍͠ঢ়گ͋Δ
• ࢹϧʔϧΛదʹઃఆ͢Δ ͨΊʹɺ͋Δఔͷࣝʢϛ υϧΣΞͳͲʣ͕ඞཁ
26 ಛతͳػೳ
27 AWSΠϯςάϨʔγϣϯ ɾAWS CloudWatch API͔Β༷ʑͳϝτϦοΫΠϕϯτΛ औಘ͠ՄࢹԽ ɾ1ͷϗετͱͯ͠ཧ ɾEC2, ELB, RDS,
ElastiCache, RedshiftͳͲ ॱ֦࣍େத
28 ઈࢍϦϦʔεܧଓதʂ 6QEBUF 6QEBUF 6QEBUF 6QEBUF
6QEBUF 6QEBUF • "NB[PO&$4 • "NB[PO4&4 ܧଓతʹϦϦʔε༧ఆʂ
29 0 0+'/$!#*) %&( -+,./ "+ +'/
2
30 #" /' ! $ -&)*+ (#" ,% .0
-
31 n 2 n 2 2 n 0/2 2 2
n 0 2 )'!, ( %&+ # "- (*&&$
32 / l X U I l e1 / l
r c M k a / l
34 ίϯςφͷਖ਼ࣜαϙʔτ • .BDLFSFMͷ֓೦ͱͯ͠ίϯςφΛදݱ • ΑΓίϯςφΛ׆༻͍͢͠ڥΛఏڙ Service Role Host Host
Container Container Container Role Role Container Container Host Host Host Containers Hosts
35 λεΫ1PEͷࢹ • .BDLFSFMͷίϯςφΤʔδΣϯτɺλεΫ &$4 1PE ,VCFSOFUFT Λࢹ͠·͢ •
ࢹ͍ͨ͠λεΫ1PEʹαΠυΧʔͱͯ͠NBDLFSFMDPOUBJOFS BHFOUΛಉډ • ࢹର͕ݸʑͷίϯςφͰͳ͍͜ͱ͕ϙΠϯτ • ΦʔέετϨʔγϣϯϓϥοτϑΥʔϜ͕࡞͢Δཧ༻ͷίϯςφ ͳͲɺࢹ͕ෆཁͳίϯςφରʹؚ·Εͳ͍ • λεΫ1PEʹଐ͢ΔίϯςφΛαʔόϓϩηεͷΑ͏ʹࢹͰ͖Δ • ࡶԻΛආ͚ͨγϯϓϧͰݟ͍͢ઃܭ
36 αΠυΧʔͱ࣮ͯ͠ߦ • λεΫ1PEͷαΠυΧʔͱ࣮ͯ͠ߦ͠·͢ ϊʔυ ϊʔυ ίϯςφΦʔέετϨʔγϣϯϓϥοτϑΥʔϜ λεΫ1PE ίϯςφ" NBDLFSFM
DPOUBJOFS BHFOU λεΫ1PE ίϯςφ% NBDLFSFM DPOUBJOFS BHFOU λεΫ1PE ίϯςφ# λεΫ1PE ίϯςφ$ Ϋϥελ αΠυΧʔͱ࣮ͯ͠ߦ ͞ΕͨλεΫ1PEͷ ίϯςφΛࢹ ཧ༻ͷίϯςφͳͲ ෆཁͳίϯςφࢹ ͠ͳ͍
37 .BDLFSFMը໘ྫ • ैདྷͷ.BDLFSFMΛ౿ऻͨ͠γϯϓϧͰݟ͍͢6*
38 ͜Ε·Ͱಉ༷ϩʔϧάϥϑͰ • λεΫ1PEʹϗετͱͯ͠αʔϏεɺϩʔϧΛઃఆՄೳ • ϩʔϧάϥϑͰλεΫ͝ͱͷϝτϦοΫͷ߹ܭ͕ݟΒΕΔ
39 αϙʔτ͢ΔϓϥοτϑΥʔϜ • "NB[PO&$$POUBJOFS4FSWJDF &$4 • 8JOEPXTίϯςφର֎ͱͳΓ·͢ • "84'BSHBUF 'BSHBUF
• ,VCFSOFUFT
40 ΤʔδΣϯτఏڙํ๏ • %PDLFSΠϝʔδͰఏڙ͠·͢
41 ඪ४Ͱࣗಈୀ • λεΫ1PEͷऴྃ࣌ʹࣗಈୀ͠·͢ • ࡉ͔ͳλεΫͷ࡞ɾऴྃϩʔϧάϥϑͰදݱՄೳ • ະຬͰऴྃ͢ΔλεΫ1PEͷ߹ɺϝτϦοΫߘ͕͞Εͳ͍߹͕͋Γ·͢ɻ ίϯςφΤʔδΣϯτ͕ ऴྃࣗ͠ಈୀ͍ͯ͠Δ
42 .BDLFSFM։ൃϩʔυϚοϓ • "84ΠϯςάϨʔγϣϯ֦ॆ • ػցֶशΛ׆༻ͨ͠ػೳ։ൃ • ίϯςφԽରԠ • GCPΠϯςάϨʔγϣϯͷ։ൃ
• SAMLೝূରԠ • ࣌ܥྻσʔλϕʔεͷ֦ு ͋͘·Ͱ༧ఆͰ͋ΓίϛοτϝϯτͰ͋Γ·ͤΜ
43 Ձ֨ɺτϥΠΞϧ
44 αʔϏεϓϥϯ ϘϦϡʔϜσΟεΧϯτ͋Γ
45 .BDLFSFMͷಋೖ·Ͱͷϑϩʔ τϥΠΞϧ ຊ൪ಋೖ ӡ༻։࢝ ͝ܖ Ϋʔϙϯ ίʔυൃߦ ٻॻ͍ɾϘϦϡʔϜσΟεΧϯτͷΈ ˞िؒ
ಋೖ͔Βӡ༻·Ͱɺ$3& ͕Ұ؏ͯ͠ ຊޠ Ͱαϙʔτ͠·͢ʂ
48 ͓٬༷
49 ࣄྫͨ͘͞Μ࡞͍͖ͬͯ·͢ʂ IUUQTNBDLFSFMJPKBCMPH
50 NBDLFSFMJP