Slide 1

Slide 1 text

CloudWatchͱϞχλϦϯάπʔϧ

Slide 2

Slide 2 text

Έͳ͞Μ

Slide 3

Slide 3 text

؂ࢹͯ͠·͔͢ʁ

Slide 4

Slide 4 text

CloudWatchόϦόϦ࢖ͬͯΔͥʂ

Slide 5

Slide 5 text

ผͷϞχλϦϯάπʔϧ΋ ૊Έ߹Θͤ·͘Γͩͥʂ

Slide 6

Slide 6 text

ͱ͍͏ํɺ

Slide 7

Slide 7 text

๻ͷ͓࿩͔ΒಘΒΕΔ΋ͷ͸ͳ͍͔΋͠Ε·ͤΜ...

Slide 8

Slide 8 text

ͦ͏͡Όͳ͍ํɺ

Slide 9

Slide 9 text

গ͠Ͱ΋͓໾ʹཱͯΕ͹޾͍Ͱ͢ɻ

Slide 10

Slide 10 text

ࠓ೔࿩͢͜ͱ

Slide 11

Slide 11 text

"࿩͢͜ͱ" » CloudWatch » CloudWatch-Logs » CloudWatch-Events » ͪΐͬͱ͚ͩZabbix(ϞχλϦϯάπʔϧ) » cloudwatchͱZabbixͱͦͷଞAWSͷαʔϏεͷ࿈ ܞ

Slide 12

Slide 12 text

"࿩͢͜ͱ" » ͜Μͳͱ͖Ͳ͏͢Δʁ » OSͷ಺෦৘ใΛऔಘ͍ͨ͠(ϓϩηε਺ͱ͔) » RDSͷ؂ࢹΛ͍ͨ͠ » cloudwatchͷσʔλΛ2िؒҎ্อଘ͍ͨ͠ » ϝϯςφϯεΠϕϯτΛݕ஌͍ͨ͠ » ϩάͷ؂ࢹΛ͍ͨ͠ » URL؂ࢹ͍ͨ͠

Slide 13

Slide 13 text

"࿩͞ͳ͍͜ͱ" » ͦͷଞAWSͷαʔϏεͷৄࡉͳઆ໌

Slide 14

Slide 14 text

"ࣗݾ঺հ" » ੴᖒ௚ਓ (@youyo_) » גࣜձࣾϔϓλΰϯ ࡾ୔ຊࣾ/ઋ୆ࣄ຿ॴ » ੨৿ݝ߂લࢢग़਎ ٶ৓ݝઋ୆ࢢࡏॅ ϦϞʔτϫʔΫͯ͠·͢ » JAWS-UG੨৿ 6/25΍Γ·͢ʂ

Slide 15

Slide 15 text

CloudWatch

Slide 16

Slide 16 text

"CloudWatch" » AWSͷ֤छαʔϏεͷϦιʔεΛऔಘͰ͖Δ » Ϧιʔεʹରͯ͠ΞϥʔϜ΍ΞΫγϣϯΛઃఆͰ͖Δ » ֤छαʔϏεͷϦιʔεΛՄࢹԽ(άϥϑԽ)Ͱ͖Δ

Slide 17

Slide 17 text

"CloudWatch" » AWSͷ֤छαʔϏεͷϦιʔεΛऔಘͰ͖Δ » EC2΍RDSͷΠϯελϯεͷঢ়ଶ؂ࢹ΍CPU࢖༻཰ ͱ͔ » S3ͷΦϒδΣΫτ਺ͱ͔ » ELBͷϨΠςϯγͱ͔ਖ਼ৗ/ҟৗϗετ਺ͱ͔

Slide 18

Slide 18 text

"CloudWatch" » CloudWatchͰऔಘͰ͖ΔσʔλΛ΋͏গ͠ࡉ͔͘ݟ ͍ͯ͘ͱ » CPU࢖༻཰(CPUUtilization)ͱ͍͏߲໨ = Metrics » EC2ͱ͍͏αʔϏε = Namespace » MetricsΛಛఆͷ஋ͰΧςΰϥΠζ͢Δ΋ͷ = Dimension ͜ͷ̏ͭΛࢦఆ͢Δ͜ͱͰ໨తͷσʔλ͕ݟΕΔ Ωʔϫʔυ: Metrics,Namespace,Dimension

Slide 19

Slide 19 text

"Metrics?,Namespace?,Dimension?" » Metrics » ࣌ܥྻͰදͨ͠σʔλϙΠϯτҰࣜ » ͜Ε͚ͩݴΘΕͯ΋Կͷ͜ͱ͔ͬ͞ͺΓΘ͔Βͳ ͍...? » ͱΓ͋͑ͣछྨͱͯ͜͠͏͍͏ͷ͕͋Δ » CPUUtilization » FreeableMemory

Slide 20

Slide 20 text

"Metrics?,Namespace?,Dimension?" » Metrics

Slide 21

Slide 21 text

"Metrics?,Namespace?,Dimension?" » Namespace » MetricsΛ·ͱΊͨ΋ͷ » ௨ৗ͸AWSͷαʔϏεͷ͜ͱ » AWS/EC2 » AWS/RDS

Slide 22

Slide 22 text

"Metrics?,Namespace?,Dimension?" » Metrics + Namespace

Slide 23

Slide 23 text

"Metrics?,Namespace?,Dimension?" » Dimension » MetricsΛಛఆͷ஋ͰΧςΰϥΠζ͢Δ΋ͷ » InstanceID » DBInstanceIdentifier

Slide 24

Slide 24 text

"Metrics?,Namespace?,Dimension?" » Metrics + Namespace + Dimension

Slide 25

Slide 25 text

"Metrics?,Namespace?,Dimension?" » ಛఆͷ࣌ؒ hh:mm ͷRDS[foo]ͷCPU࢖༻཰ͷσʔ λ͸͜͜

Slide 26

Slide 26 text

"Metrics?,Namespace?,Dimension?" » ϚωδϝϯτίϯιʔϧͰݟΔͱ

Slide 27

Slide 27 text

"Metrics?,Namespace?,Dimension?" » ඪ४ϝτϦΫεʁ

Slide 28

Slide 28 text

"CloudWatch" » ϝτϦΫεʹ͸2छྨ͋Δ » ඪ४ϝτϦΫε » ΧελϜϝτϦΫε

Slide 29

Slide 29 text

"CloudWatch" » ඪ४ϝτϦΫε » AWSͰ༻ҙͯ͘͠ΕͯΔ΋ͷ » CPUUtilization » DiskWriteBytes » StatusCheckFailed_Instance » ͨ͘͞Μ͋Δ

Slide 30

Slide 30 text

"CloudWatch" » ΧελϜϝτϦΫε » ඪ४ϝτϦΫεҎ֎ͷಠࣗʹઃఆ͢ΔϝτϦΫε » APIܦ༝ͰఆٛՄೳ $ aws cloudwatch put-metric-data \ --namespace "MyService" \ --metric-name "ProcessCount" \ --dimensions InstanceId=i-xxxxxxxx \ --value 15

Slide 31

Slide 31 text

"CloudWatch" » ΧελϜϝτϦΫε

Slide 32

Slide 32 text

"CloudWatch" » ΧελϜϝτϦΫε » σʔλαΠζʹ͸੍ݶ͕͋Δ » HTTP GET͸8KB » HTTP POST͸40KB » 1ͭͷPutMetricsDataϦΫΤετʹ20σʔλ· Ͱ » APIίʔϧ਺ʹ΋੍ݶ͋Γ

Slide 33

Slide 33 text

"CloudWatch" » CloudWatchͰݟΕΔ৘ใ͸౷ܭ৘ใ » ϝτϦΫεσʔλΛࢦఆͨ͠ظؒͰूܭͨ͠΋ͷ » CPUUtilizationͷ5෼ؒ͝ͱͷฏۉ஋Λදࣔ͠ ͯΔ

Slide 34

Slide 34 text

"CloudWatch" » CloudWatchͰݟΕΔ৘ใ͸౷ܭ৘ใ » ϝτϦΫεσʔλΛࢦఆͨ͠ظؒͰूܭͨ͠΋ͷ » EC2Ͱ͸جຊϞχλϦϯάͰ͸5෼ִؒ » ৄࡉϞχλϦϯά(༗ঈ)Ͱ͸1෼ִؒ » ͦΕҎ֎ͷϝτϦΫε͸ϝτϦΫεຖʹσʔλͷߋ ৽ִ͕ܾؒΊΒΕͯΔ » σʔλͷอଘظؒ͸2िؒ

Slide 35

Slide 35 text

"CloudWatch" » AWSͷ֤छαʔϏεͷϦιʔεʹର͢ΔΞϥʔϜΛઃ ఆͰ͖Δ » EC2΍RDSͷΠϯελϯεͷঢ়ଶ؂ࢹ΍CPU࢖༻཰ ͱ͔ » S3ͷΦϒδΣΫτ਺ͱ͔ » ELBͷϨΠςϯγͱ͔ਖ਼ৗ/ҟৗϗετ਺ͱ͔

Slide 36

Slide 36 text

"CloudWatch" » Ϧιʔεʹରͯ͠ΞϥʔϜ΍ΞΫγϣϯΛઃఆͰ͖Δ » ৚݅Λઃఆͯ͠ɺͦΕΛຬͨͨ͠ΒΞΫγϣϯΛ࣮ ߦͰ͖Δ » CPUUtilization͕5෼ؒ70%Ҏ্Λه࿥ͨ͠ Β » EC2Πϯελϯεͷεςʔλε͕failedʹͳͬ ͨΒ » ޷͖ͳΑ͏ʹઃఆͰ͖Δ

Slide 37

Slide 37 text

"CloudWatch" » EC2 Auto Recovery » γεςϜεςʔλε͕failedͳͬͨΒࣗಈͰ࠶ى ಈ͞ΕΔ

Slide 38

Slide 38 text

"CloudWatch" » Ϧιʔεʹରͯ͠ΞϥʔϜ΍ΞΫγϣϯΛઃఆͰ͖Δ » ΞΫγϣϯ͸Notification(SNSɺEmail)ɺ EC2 Action΍AutoScaling ActionͳͲ४උ ͞Ε͍ͯΔ » ͱΓ͋͑ͣSNSʹ౉͓͚ͯ͠͹ͦͷޙAWS Lambda ࢖ͬͯͲ͏ͱͰ΋Ͱ͖Δ

Slide 39

Slide 39 text

"CloudWatch" » ֤छαʔϏεͷϦιʔεΛՄࢹԽ(άϥϑԽ)Ͱ͖Δ » ࣗ༝ʹϝτϦΫεΛ૊Έ߹ΘͤͨμογϡϘʔυ͕ ࡞ΕΔ

Slide 40

Slide 40 text

"CloudWatch" » ֤छαʔϏεͷϦιʔεΛՄࢹԽ(άϥϑԽ)Ͱ͖Δ » ࣗ༝ʹϝτϦΫεΛ૊Έ߹ΘͤͨμογϡϘʔυ͕ ࡞ΕΔ » Create Dashboard => Add widget » Widgetʹ͸Metrics graphͱText widgetͷ 2छྨ͋Δ » Text widgetʹ͸markdownܗࣜͷจষΛ࡞ΕΔ

Slide 41

Slide 41 text

CloudWatch-Logs

Slide 42

Slide 42 text

"CloudWatch-Logs" » AWSͷͦͷଞαʔϏε͕ग़ྗ͢Δϩάͷू໿ઌ » CloudWatch Logs AgentΛ࢖͏͜ͱͰEC2Πϯε λϯε಺෦ͷϩάͷू໿΋Մೳ » CloudWatch Logs Metrics Filter Ͱϩά͔Β ಛఆจࣈྻͷϑΟϧλϦϯά͕Մೳ » ϑΟϧλϦϯά݁ՌΛड͚औΔΧελϜϝτϦΫε Λ࡞੒͠ɺCloudWatchͷΞϥʔϜػೳͱ૊Έ߹ ΘͤͯΞΫγϣϯΛ࣮ߦՄೳ

Slide 43

Slide 43 text

"CloudWatch-Logs" » AWSͷͦͷଞαʔϏε͕ग़ྗ͢Δϩάͷू໿ઌ » AWS Lambda΍VPC Flow LogsͳͲ » ٯʹݴ͏ͱɺAWSͷͦͷଞαʔϏε͕ CloudWatch-LogsͷpermissionٻΊͯ͘Δͷ ͰڐՄͯ͋͛͠ͳ͍ͱ͍͚ͳ͍

Slide 44

Slide 44 text

"CloudWatch-Logs" » CloudWatch Logs AgentΛ࢖͏͜ͱͰEC2Πϯε λϯε಺෦ͷϩάͷू໿΋Մೳ » CloudWatch-Logsʹॻ͖ࠐΉͷͰpermission ઃఆ͕ඞཁ » EC2 Role͔CloudWatch Logs AgentΠϯ ετʔϧޙͷΞΫηεΩʔઃఆ » AmazonLinuxͩͱΠϯετʔϧ΋؆୯ $ sudo yum install awslogs

Slide 45

Slide 45 text

"CloudWatch-Logs" » CloudWatch Logs Agent ஫ҙ఺ » సૹͰ͖ΔϩάϝοηʔδαΠζ » Agent͕1ճʹϓογϡͰ͖ΔαΠζ͸࠷େ 32KB » ͦΕΛ௒͑Δͱtruncate(੾Γ٧ΊΒΕΔ) » ରԠ͍ͯ͠Δϩάϩʔςʔγϣϯ » rename-recreate΍copy-truncateͳͲ

Slide 46

Slide 46 text

"CloudWatch-Logs" » VPC Flow Logs

Slide 47

Slide 47 text

"CloudWatch-Logs" » CloudWatch Logs Metrics Filter Ͱϩά͔Β ಛఆจࣈྻͷϑΟϧλϦϯά͕Մೳ » ϑΟϧλϦϯά݁ՌΛड͚औΔΧελϜϝτϦΫε Λ࡞੒͠ɺCloudWatchͷΞϥʔϜػೳͱ૊Έ߹ ΘͤͯΞΫγϣϯΛ࣮ߦՄೳ

Slide 48

Slide 48 text

"CloudWatch-Logs" » Logs͔ΒϑΟϧλʔΛ࡞੒͍ͨ͠LogGroupΛબ୒͠ ͯCreateMetricsFilter

Slide 49

Slide 49 text

"CloudWatch-Logs" » ύλʔϯΛ࡞੒ͯ͠Assign Metrics

Slide 50

Slide 50 text

"CloudWatch-Logs" » MetricsͷৄࡉΛೖྗͯ͠CreateFilter͢Δ

Slide 51

Slide 51 text

"CloudWatch-Logs" » ϑΟϧλʔʹϚονͨ࣌͠ʹΧελϜϝτϦΫε΁σ ʔλ͕ૹΒΕΔΑ͏ʹͳΔ

Slide 52

Slide 52 text

"CloudWatch-Logs" » ར༻ྫ » CloudTrailͱ࿈ܞ͠ɺϚωδϝϯτίϯιʔϧ ͷૢ࡞ϩάΛCloudWatch-LogsʹૹΔ » rootΞΧ΢ϯτͰͷϩάΠϯ΍ɺ࿈ଓͨ͠ϩάΠ ϯࣦഊͳͲΛݕ஌͢ΔϑΟϧλʔΛ࡞੒ » ͦΕΒʹϚονͨ͠ΒΧελϜϝτϦΫε͕ߋ৽͞ ΕͯΞϥʔϜൃੜ » ͓޷͖ͳΞΫγϣϯͰ௨஌

Slide 53

Slide 53 text

CloudWatch-Events

Slide 54

Slide 54 text

"CloudWatch-Events" » AWSϦιʔεͷมߋ(Πϕϯτ)Λݕ஌ͯ͠ɺετϦʔ Ϝ఻ୡ(ΞΫγϣϯΛى͜͢͜ͱ)͕Ͱ͖ΔαʔϏε » Πϕϯτ: EC2 instance state change notification, AWS API Call, Auto Scaling, Schedule » ΞΫγϣϯ: AWS LambdaɺAmazon Kinesis StreamɺAmazon SNS, Bullet-inλʔήοτ » ϙʔϦϯάͰͷঢ়ଶ؂ࢹ͔Βͷղ์ » EventDrivenArchitectureͷத৺ʹͳΔͷ͔ͳʁ

Slide 55

Slide 55 text

"CloudWatch-Events" » EC2 instance state change notification » ಛఆɺ·ͨ͸͍ͣΕ͔ͷΠϯελϯεͷঢ়ଶʹมԽ ͕͋ͬͨΒετϦʔϜ » runningʹͳͬͨΒɺͱ͔ɺrunningҎ֎ʹ ͳͬͨΒɺͳͲ » ঢ়ଶ͕stoppedʹͳͬͨΒrebootɺͱ͔ઃఆͰ ͖ͪΌ͏

Slide 56

Slide 56 text

"CloudWatch-Events" » AWS API Call, Auto Scaling΋ಉ༷ » ΠϕϯτʹԠͯ͡ετϦʔϜ » AWS API Call: RDSͷDeleteDBInstance͕ ݺ͹ΕͨΒͱ͔ » Auto Scaling: EC2 Launch Successfulͩ ͬͨΒͱ͔ » ࠓ͸ϝδϟʔͳαʔϏεʹ͔͠ରԠͯ͠ͳ͍͚Ͳࠓޙ ରԠαʔϏεΛ૿΍͢༧ఆ ͬͯawsͷϒϩάʹॻ͍ͯͨͷͰ૿͍͑ͯ͘ͱࢥ͏

Slide 57

Slide 57 text

"CloudWatch-Events" » Schedule » ཁ͸cron » ࠷୹1෼ִؒͰΞΫγϣϯ࣮ߦ » ͜ΕͱAWS LambdaͰԿͰ΋Ͱ͖Δ͠޾ͤ ✌('ω'✌ )ࡾ✌('ω')✌ࡾ( ✌'ω')✌

Slide 58

Slide 58 text

"CloudWatch-Events" » ΞΫγϣϯ » Bullet-inλʔήοτ » Create a Snapshot of an EBS volume » Reboot EC2 instance » Terminate EC2 instance » Stop EC2 instance

Slide 59

Slide 59 text

"CloudWatch-Events" » ScheduleͱCreate a Snapshot of an EBS volume૊Έ߹Θͤͯຖ೔εφοϓγϣοτࣗಈͰऔ ΕΔ » ศརɻ͓खܰɻ » Ͱ΋Snapshot࡟আʹ͸ରԠͯ͠ͳ͍ » ࡟আ͸ಉ͡Α͏ʹScheduleͰLambdaͰ΋ಈ͔ͯ͠ ΍Ε͹͍͍

Slide 60

Slide 60 text

"CloudWatch-Events" » CloudWatchͷEvents͔ΒCreate͠ɺ EventSelectorͱTargetsΛઃఆ

Slide 61

Slide 61 text

"CloudWatch-Events" » Nameͱద੾ͳIAMRoleΛઃఆͯ͠׬ྃ

Slide 62

Slide 62 text

Zabbix

Slide 63

Slide 63 text

"Zabbix" » ossͷ౷߹؂ࢹιϑτ΢ΣΞ » ϑϩϯτΤϯυ͸php,όοΫΤϯυ͸MySQL/ PostgresQL/SQLiteͱ͔ » ຊମ͸Cݴޠ » json-rpcͰapiૢ࡞Ͱ͖Δ

Slide 64

Slide 64 text

"Zabbix" » ઐ༻ͷZabbixAgentΛ࢖༻ͯ͠OS಺෦ͷσʔλΛऔ ಘɺZabbixServerʹૹ৴ » ϓϩηε਺ɺcpu/memoryͳͲͷϦιʔε৘ใͳͲ

Slide 65

Slide 65 text

"Zabbix" » ࣗલͰΠϯελϯεཱͯͯӡ༻͢Δ͜ͱʹͳΔͷͰಛ ʹετϨʔδαΠζ΍σʔλอଘظؒͳͲʹ੍ݶ͸ͳ ͍(͓ۚͷڐ͔͗͢Γ) » Ξϥʔτ௨஌ํ๏΋ࣗ༝ʹ࡞ΕΔ(alertscripts) » औಘ͢Δσʔλ΋ࣗ༝ʹ࡞ΕΔ (UserParameter,externalscripts) » CloudWatchͷσʔλΛZabbixʹಥͬࠐΉ͜ͱͰσ ʔλอଘظؒ2िؒͷนΛಥഁʂ

Slide 66

Slide 66 text

"Zabbix" » CloudWatchͷσʔλΛZabbixʹ » APIܦ༝ » Fluentd » ଞʹ΋͓޷͖ͳΑ͏ʹ

Slide 67

Slide 67 text

"Zabbix" » APIܦ༝ » aws-sdk » aws-cli » UserParameter͔ΒεΫϦϓτΛݺͼग़ͯ͠σʔ λऔಘ͢Δύλʔϯ » externalscriptsΛ࣮ߦͯ͠σʔλऔಘ͢Δύ λʔϯ

Slide 68

Slide 68 text

"Zabbix" » Fluentd » fluent-plugin-zabbix » fluent-plugin-cloudwatch » fluent-plugin-cloudwatchͰσʔλΛऔಘ͠ ͯfluent-plugin-zabbixͰZabbixʹૹΔ

Slide 69

Slide 69 text

"Zabbix" » RDS for MySQLͷσʔλ

Slide 70

Slide 70 text

"Zabbix" » RDS for MySQLͷσʔλ

Slide 71

Slide 71 text

"Zabbix" » σʔλΛZabbixʹ·ͱΊΔϝϦοτ » σʔλͷҰݩԽ » ௨஌ํ๏΋ҰݩԽ » σʔλอଘظؒͳͲͷ࢓༷΋ࣗ༝ʹܾΊΒΕΔ » ϝϯςφϯεͳͲࣗ෼ͰίϯτϩʔϧͰ͖Δ

Slide 72

Slide 72 text

"Zabbix" » Zabbixʹ·ͱΊΔσϝϦοτ » (Πϯελϯε͕ඞཁͳ෼)͓͕͔͔ۚΔ » CloudWatchͱࣗલZabbixɺͲ͕ͬͪݎ࿚͔ʁ » Πϯελϯεͷӡ༻େมͳͷͰ͸ʁ

Slide 73

Slide 73 text

"Zabbix" » Ͳ͏͍͏ํ਑Ͱ؂ࢹ͍͔ͯ͘͠Α͘ߟ͑Δඞཁ͕͋Δ » ࠷ۙ͸MackerelྲྀߦͬͯΔ͠AWSΠϯςάϨʔγϣ ϯग़ͨ͠ɺMonitoring as a Service࢖͏ͷ΋શ વ͋Γɻ » ͦ΋ͦ΋CloudWatch͕ͦΕͩ͠ɺCloudWatchʹ· ͱΊΔͷ΋Ұͭͷղ » ສ͕ҰCloudWatchʹো֐ى͜ΔͱɺͦΕΛࣗ෼Ͱ͸ ίϯτϩʔϧͰ͖ͳ͍ɻ؂ࢹαʔϏεΛఏڙ͢Δฐࣾ ͱͯ͠͸NG

Slide 74

Slide 74 text

͜Μͳͱ͖Ͳ͏͢Δʁ

Slide 75

Slide 75 text

"͜Μͳͱ͖Ͳ͏͢Δʁ" » OSͷ಺෦৘ใΛऔಘ͍ͨ͠(ϓϩηε਺ͱ͔) » RDSͷ؂ࢹΛ͍ͨ͠ » cloudwatchͷσʔλΛ2िؒҎ্อଘ͍ͨ͠ » ϝϯςφϯεΠϕϯτΛݕ஌͍ͨ͠ » ϩάͷ؂ࢹΛ͍ͨ͠ » URL؂ࢹ͍ͨ͠

Slide 76

Slide 76 text

"Warning!" » ฐࣾͰ͸ZabbixΛϝΠϯͷ؂ࢹγεςϜʹ࠾༻ͯ͠ ͍·͢ » ͦͷ্ͰฐࣾͰ͸͜͏͍ͯ͠Δɺͱ͍͏͓࿩Ͱ͢ » ͦͷલఏͰ͓࿩͕ਐΉͷͰͦͷ఺ྃ͝ঝ͍ͩ͘͞

Slide 77

Slide 77 text

"OSͷ಺෦৘ใΛऔಘ͍ͨ͠(ϓϩηε਺ͱ͔)" » Zabbix࢖ͬͯૉ௚ʹσʔλऔಘ » proc.num ͱ͍͏؂ࢹΞΠςϜ͕༻ҙ͞Ε͍ͯΔ » CloudWatchΛ࢖͍͍ͨਓ͸ΧελϜϝτϦΫεͰ » OSࣗମͷ؂ࢹ͸جຊZabbix

Slide 78

Slide 78 text

"RDSͷ؂ࢹΛ͍ͨ͠" » ZabbixAgentΛRDSͷΑ͏ͳαʔϏεʹΠϯετʔ ϧ͸Ͱ͖ͳ͍ » CloudWatchͷσʔλΛFluentd࢖ͬͯZabbixʹૹ ΓɺZabbixͰϞχλϦϯά » ΋ͪΖΜCloudWatchͷΞϥʔϜػೳͰΞϥʔτ͋͛ Δ΄͏͕γϯϓϧ

Slide 79

Slide 79 text

"cloudwatchͷσʔλΛ2िؒҎ্อଘ͍ͨ͠" » Zabbixʹ·ͱΊΔ͜ͱͰղܾ » ࠷ۙͩͱDynamoDBʹஷΊ͓ͯ͘ύλʔϯ΋͋Δ໛༷ » ͨͩͦ͠ͷσʔλΛͦͷΑ͏ʹ࢖͏ͷ͔ͪΌΜͱߟ ͑ͳ͍ͱ͍͚ͳ͍ » Ͱ΋ʮͱΓ͋͑ͣ࢒͓͔ͯ͠ͳ͍ͱޙͰඞཁʹͳΔ ͔΋͠Εͳ͍͠...ʯ΋͓͕ۚڐͤ͹શવ͋Γͩͱ ͸ࢥ͏ɻอݥΈ͍ͨͳ΋ͷɻ

Slide 80

Slide 80 text

"ϝϯςφϯεΠϕϯτΛݕ஌͍ͨ͠" » CloudWatch-Events + AWS Lambda + Slack » ࢦఆͨ͠ΞΧ΢ϯτ಺ͷશΠϯελϯεͷϝϯςφϯ εΠϕϯτͷ༗ແΛνΣοΫ͢ΔLambda Function Λ࡞੒ » ͦΕΛCloudWatch-EventsͷScheduleͰ1೔1ճ ࣮ߦ » ϝϯςφϯεΠϕϯτ͕͋Ε͹Slackʹ௨஌͍ͯ͠Δ

Slide 81

Slide 81 text

"ϝϯςφϯεΠϕϯτΛݕ஌͍ͨ͠"

Slide 82

Slide 82 text

"ϝϯςφϯεΠϕϯτΛݕ஌͍ͨ͠" » ZabbixͰਖ਼ৗʹಈ͍ͯΔ͔ͷ؂ࢹΛ΍Γ͍ͨ » ࠓ͸ຖ೔Slackʹಈ͍ͯ·͢Αʔ௨஌͖ͯΔ » ҟৗ͕͋ͬͨͱ͖͚ͩΘ͔Ε͹͍͍(ΊΜͲͯ͘͘͞ ࣮૷ͯ͠ͳ͍͚ͩ) » ࠓͷͱ͜ΖEC2ͱRDS͚ͩରԠɻElastiCacheͱ ͔...(ΊΜͲ࣮ͯ͘͘͞૷ͯ͠ͳ͍͚ͩ)

Slide 83

Slide 83 text

"ϩάͷ؂ࢹΛ͍ͨ͠" » OSͷϩά͸Zabbixͷϩά؂ࢹ࢖ͬͯΔ » AWSαʔϏεͷϩά͸CloudWatch-Logs » ҰݩԽͰ͖ͯͳ͍... » ೰Έத

Slide 84

Slide 84 text

"URL؂ࢹΛ͍ͨ͠" » ZabbixͷWeb؂ࢹ » CloudWatch͸͋͘·ͰAWSαʔϏεͷϦιʔεΛݟ Δ΋ͷ » Ͱ΋CloudWatch-Events+AWS LambdaͰ࡞ΕΔ

Slide 85

Slide 85 text

"ࠓ͜ͷΞΧ΢ϯτ͍͘Β࢖ͬͯΔΜͩΖʁ" » ϏϦϯάΞϥʔτ » ༗໊ͩ͠஌ͬͯΔਓ͕΄ͱΜͲͩͱࢥ͏͚Ͳɺ͔ͩΒ ͦ͜ඞͣઃఆͯ͠΄͍͠ » AWSͷར༻ྉ΋CloudWatchͷඪ४ϝτϦΫεͱͯ͠ ఏڙ͞Ε͍ͯΔͨΊɺΞϥʔϜઃఆͯ͠ΞΫγϣϯΛ ىͤ͜Δ » Zabbixʹ·ͱΊͯτϦΨʔઃఆ͢Δ΋Α͠ɻ͓޷͖ ͳΞΫγϣϯΛɻ

Slide 86

Slide 86 text

"·ͱΊ" » CloudWatch͔ΒAWSϦιʔεݟΕΔɻΞϥʔϜ+Ξ ΫγϣϯͰ؂ࢹ΋Ͱ͖Δ » CloudWatch-Logsʹ͸͍ΖΜͳAWSαʔϏεͷϩά ͕ू໿͞ΕͯΔɻOSͷϩά؂ࢹ΋ؚΊͯͲ͜ͰͲ͏؂ ࢹ͢Δ͔Α͘ߟ͑Δඞཁ͕͋Δ » CloudWatch-Events͸ΠϕϯτυϦϒϯΞʔΩςΫ νϟத৺(ʹ͖ͬͱͳΔ) » ແཧʹAWS಺Ͱ׬݁ͤ͞Δඞཁ͸ͳ͍ɻͦΕͧΕʹ͋ ͬͨϕετͳબ୒Λʂ

Slide 87

Slide 87 text

͓·͚

Slide 88

Slide 88 text

"ͳΜͪΌͬͯAmazon RDS for Aurora" » Amazon RDS for AuroraͰ͸ετϨʔδ͕ࣗಈ֦ ு͢Δ » Amazon RDS for MySQLͰ͸ετϨʔδαΠζΛࣗ ෼Ͱઃఆ͢Δ » ετϨʔδͷۭ͖༰ྔ͕গͳ͘ͳͬͨͱ͖ʹΞΫγϣ ϯى͜͢ΞϥʔϜઃఆͰ͖Δ

Slide 89

Slide 89 text

ϐίʔϯ!

Slide 90

Slide 90 text

ͦ͜ͰετϨʔδ֦ு ͨ͠Β͍͍Μ͡ΌͶʁ

Slide 91

Slide 91 text

"ͳΜͪΌͬͯAmazon RDS for Aurora"

Slide 92

Slide 92 text

"ͳΜͪΌͬͯAmazon RDS for Aurora" » ΠϕϯτυϦϒϯʂ » ฐࣾZabbixͰ͓ࢼ͠த » ࣗಈͰετϨʔδ֦ு͞Ε ͨΒSlackʹ΋௨஌͞ΕΔ (ਤʹࡌͤ๨Εͨ) » ֦ுத͸ύϑΥʔϚϯε௿ ԼͷڪΕ͋Δ͚ͲɺͦΕ͕ উखʹ࣮ߦ͞ΕΔ͜ͱΛڐ ༰Ͱ͖ΔͳΒ͋Γ

Slide 93

Slide 93 text

͋Γ͕ͱ͏͍͟͝·ͨ͠