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
CloudWatch&MonitoringTools
Search
youyo
May 21, 2016
Technology
1
250
CloudWatch&MonitoringTools
JAWS-UG函館20160521
youyo
May 21, 2016
Tweet
Share
More Decks by youyo
See All by youyo
家の快適度を計測してみた
youyo
1
180
Get started AWS CDK
youyo
0
93
Tried to create a deployment pipeline of AutoML Vision.
youyo
0
60
API GatewayのWebSocket対応について
youyo
0
720
GCRと脆弱性検査
youyo
0
180
goodbye-ec2
youyo
0
590
それでも僕はzabbixと生きていく
youyo
1
460
About AWS Lambda and kintone
youyo
1
240
TerraformとWerckerとAWS Organizationsで始めるステージング・開発環境構築 / terraform-wercker-aws-organizations
youyo
1
34k
Other Decks in Technology
See All in Technology
watsonx.ai Dojo #5 ファインチューニングとInstructLAB
oniak3ibm
PRO
0
170
kargoの魅力について伝える
magisystem0408
0
210
ハイテク休憩
sat
PRO
2
170
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
170
大幅アップデートされたRagas v0.2をキャッチアップ
os1ma
2
540
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
380
ブラックフライデーで購入したPixel9で、Gemini Nanoを動かしてみた
marchin1989
1
540
2024年にチャレンジしたことを振り返るぞ
mitchan
0
140
10分で学ぶKubernetesコンテナセキュリティ/10min-k8s-container-sec
mochizuki875
3
360
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
170
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
270
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
890
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
243
12k
GitHub's CSS Performance
jonrohan
1030
460k
Designing for Performance
lara
604
68k
Building Applications with DynamoDB
mza
91
6.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Done Done
chrislema
181
16k
Designing Experiences People Love
moore
138
23k
Making Projects Easy
brettharned
116
5.9k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Designing for humans not robots
tammielis
250
25k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
Transcript
CloudWatchͱϞχλϦϯάπʔϧ
Έͳ͞Μ
ࢹͯ͠·͔͢ʁ
CloudWatchόϦόϦͬͯΔͥʂ
ผͷϞχλϦϯάπʔϧ Έ߹Θͤ·͘Γͩͥʂ
ͱ͍͏ํɺ
ͷ͓͔ΒಘΒΕΔͷͳ͍͔͠Ε·ͤΜ...
ͦ͏͡Όͳ͍ํɺ
গ͠Ͱ͓ʹཱͯΕ͍Ͱ͢ɻ
ࠓ͢͜ͱ
"͢͜ͱ" » CloudWatch » CloudWatch-Logs » CloudWatch-Events » ͪΐͬͱ͚ͩZabbix(ϞχλϦϯάπʔϧ) »
cloudwatchͱZabbixͱͦͷଞAWSͷαʔϏεͷ࿈ ܞ
"͢͜ͱ" » ͜Μͳͱ͖Ͳ͏͢Δʁ » OSͷ෦ใΛऔಘ͍ͨ͠(ϓϩηεͱ͔) » RDSͷࢹΛ͍ͨ͠ » cloudwatchͷσʔλΛ2िؒҎ্อଘ͍ͨ͠ »
ϝϯςφϯεΠϕϯτΛݕ͍ͨ͠ » ϩάͷࢹΛ͍ͨ͠ » URLࢹ͍ͨ͠
"͞ͳ͍͜ͱ" » ͦͷଞAWSͷαʔϏεͷৄࡉͳઆ໌
"ࣗݾհ" » ੴᖒਓ (@youyo_) » גࣜձࣾϔϓλΰϯ ࡾຊࣾ/ઋࣄॴ » ੨ݝ߂લࢢग़ ٶݝઋࢢࡏॅ
ϦϞʔτϫʔΫͯ͠·͢ » JAWS-UG੨ 6/25Γ·͢ʂ
CloudWatch
"CloudWatch" » AWSͷ֤छαʔϏεͷϦιʔεΛऔಘͰ͖Δ » Ϧιʔεʹରͯ͠ΞϥʔϜΞΫγϣϯΛઃఆͰ͖Δ » ֤छαʔϏεͷϦιʔεΛՄࢹԽ(άϥϑԽ)Ͱ͖Δ
"CloudWatch" » AWSͷ֤छαʔϏεͷϦιʔεΛऔಘͰ͖Δ » EC2RDSͷΠϯελϯεͷঢ়ଶࢹCPU༻ ͱ͔ » S3ͷΦϒδΣΫτͱ͔ » ELBͷϨΠςϯγͱ͔ਖ਼ৗ/ҟৗϗετͱ͔
"CloudWatch" » CloudWatchͰऔಘͰ͖ΔσʔλΛ͏গ͠ࡉ͔͘ݟ ͍ͯ͘ͱ » CPU༻(CPUUtilization)ͱ͍͏߲ = Metrics » EC2ͱ͍͏αʔϏε
= Namespace » MetricsΛಛఆͷͰΧςΰϥΠζ͢Δͷ = Dimension ͜ͷ̏ͭΛࢦఆ͢Δ͜ͱͰతͷσʔλ͕ݟΕΔ Ωʔϫʔυ: Metrics,Namespace,Dimension
"Metrics?,Namespace?,Dimension?" » Metrics » ࣌ܥྻͰදͨ͠σʔλϙΠϯτҰࣜ » ͜Ε͚ͩݴΘΕͯԿͷ͜ͱ͔ͬ͞ͺΓΘ͔Βͳ ͍...? » ͱΓ͋͑ͣछྨͱͯ͜͠͏͍͏ͷ͕͋Δ
» CPUUtilization » FreeableMemory
"Metrics?,Namespace?,Dimension?" » Metrics
"Metrics?,Namespace?,Dimension?" » Namespace » MetricsΛ·ͱΊͨͷ » ௨ৗAWSͷαʔϏεͷ͜ͱ » AWS/EC2 »
AWS/RDS
"Metrics?,Namespace?,Dimension?" » Metrics + Namespace
"Metrics?,Namespace?,Dimension?" » Dimension » MetricsΛಛఆͷͰΧςΰϥΠζ͢Δͷ » InstanceID » DBInstanceIdentifier
"Metrics?,Namespace?,Dimension?" » Metrics + Namespace + Dimension
"Metrics?,Namespace?,Dimension?" » ಛఆͷ࣌ؒ hh:mm ͷRDS[foo]ͷCPU༻ͷσʔ λ͜͜
"Metrics?,Namespace?,Dimension?" » ϚωδϝϯτίϯιʔϧͰݟΔͱ
"Metrics?,Namespace?,Dimension?" » ඪ४ϝτϦΫεʁ
"CloudWatch" » ϝτϦΫεʹ2छྨ͋Δ » ඪ४ϝτϦΫε » ΧελϜϝτϦΫε
"CloudWatch" » ඪ४ϝτϦΫε » AWSͰ༻ҙͯ͘͠ΕͯΔͷ » CPUUtilization » DiskWriteBytes »
StatusCheckFailed_Instance » ͨ͘͞Μ͋Δ
"CloudWatch" » ΧελϜϝτϦΫε » ඪ४ϝτϦΫεҎ֎ͷಠࣗʹઃఆ͢ΔϝτϦΫε » APIܦ༝ͰఆٛՄೳ $ aws cloudwatch
put-metric-data \ --namespace "MyService" \ --metric-name "ProcessCount" \ --dimensions InstanceId=i-xxxxxxxx \ --value 15
"CloudWatch" » ΧελϜϝτϦΫε
"CloudWatch" » ΧελϜϝτϦΫε » σʔλαΠζʹ੍ݶ͕͋Δ » HTTP GET8KB » HTTP
POST40KB » 1ͭͷPutMetricsDataϦΫΤετʹ20σʔλ· Ͱ » APIίʔϧʹ੍ݶ͋Γ
"CloudWatch" » CloudWatchͰݟΕΔใ౷ܭใ » ϝτϦΫεσʔλΛࢦఆͨ͠ظؒͰूܭͨ͠ͷ » CPUUtilizationͷ5ؒ͝ͱͷฏۉΛදࣔ͠ ͯΔ
"CloudWatch" » CloudWatchͰݟΕΔใ౷ܭใ » ϝτϦΫεσʔλΛࢦఆͨ͠ظؒͰूܭͨ͠ͷ » EC2ͰجຊϞχλϦϯάͰ5ִؒ » ৄࡉϞχλϦϯά(༗ঈ)Ͱ1ִؒ »
ͦΕҎ֎ͷϝτϦΫεϝτϦΫεຖʹσʔλͷߋ ৽ִ͕ܾؒΊΒΕͯΔ » σʔλͷอଘظؒ2िؒ
"CloudWatch" » AWSͷ֤छαʔϏεͷϦιʔεʹର͢ΔΞϥʔϜΛઃ ఆͰ͖Δ » EC2RDSͷΠϯελϯεͷঢ়ଶࢹCPU༻ ͱ͔ » S3ͷΦϒδΣΫτͱ͔ »
ELBͷϨΠςϯγͱ͔ਖ਼ৗ/ҟৗϗετͱ͔
"CloudWatch" » Ϧιʔεʹରͯ͠ΞϥʔϜΞΫγϣϯΛઃఆͰ͖Δ » ݅Λઃఆͯ͠ɺͦΕΛຬͨͨ͠ΒΞΫγϣϯΛ࣮ ߦͰ͖Δ » CPUUtilization͕5ؒ70%Ҏ্Λهͨ͠ Β »
EC2Πϯελϯεͷεςʔλε͕failedʹͳͬ ͨΒ » ͖ͳΑ͏ʹઃఆͰ͖Δ
"CloudWatch" » EC2 Auto Recovery » γεςϜεςʔλε͕failedͳͬͨΒࣗಈͰ࠶ى ಈ͞ΕΔ
"CloudWatch" » Ϧιʔεʹରͯ͠ΞϥʔϜΞΫγϣϯΛઃఆͰ͖Δ » ΞΫγϣϯNotification(SNSɺEmail)ɺ EC2 ActionAutoScaling ActionͳͲ४උ ͞Ε͍ͯΔ »
ͱΓ͋͑ͣSNSʹ͓͚ͯͦ͠ͷޙAWS Lambda ͬͯͲ͏ͱͰͰ͖Δ
"CloudWatch" » ֤छαʔϏεͷϦιʔεΛՄࢹԽ(άϥϑԽ)Ͱ͖Δ » ࣗ༝ʹϝτϦΫεΛΈ߹ΘͤͨμογϡϘʔυ͕ ࡞ΕΔ
"CloudWatch" » ֤छαʔϏεͷϦιʔεΛՄࢹԽ(άϥϑԽ)Ͱ͖Δ » ࣗ༝ʹϝτϦΫεΛΈ߹ΘͤͨμογϡϘʔυ͕ ࡞ΕΔ » Create Dashboard =>
Add widget » WidgetʹMetrics graphͱText widgetͷ 2छྨ͋Δ » Text widgetʹmarkdownܗࣜͷจষΛ࡞ΕΔ
CloudWatch-Logs
"CloudWatch-Logs" » AWSͷͦͷଞαʔϏε͕ग़ྗ͢Δϩάͷूઌ » CloudWatch Logs AgentΛ͏͜ͱͰEC2Πϯε λϯε෦ͷϩάͷूՄೳ » CloudWatch
Logs Metrics Filter Ͱϩά͔Β ಛఆจࣈྻͷϑΟϧλϦϯά͕Մೳ » ϑΟϧλϦϯά݁ՌΛड͚औΔΧελϜϝτϦΫε Λ࡞͠ɺCloudWatchͷΞϥʔϜػೳͱΈ߹ ΘͤͯΞΫγϣϯΛ࣮ߦՄೳ
"CloudWatch-Logs" » AWSͷͦͷଞαʔϏε͕ग़ྗ͢Δϩάͷूઌ » AWS LambdaVPC Flow LogsͳͲ » ٯʹݴ͏ͱɺAWSͷͦͷଞαʔϏε͕
CloudWatch-LogsͷpermissionٻΊͯ͘Δͷ ͰڐՄͯ͋͛͠ͳ͍ͱ͍͚ͳ͍
"CloudWatch-Logs" » CloudWatch Logs AgentΛ͏͜ͱͰEC2Πϯε λϯε෦ͷϩάͷूՄೳ » CloudWatch-Logsʹॻ͖ࠐΉͷͰpermission ઃఆ͕ඞཁ »
EC2 Role͔CloudWatch Logs AgentΠϯ ετʔϧޙͷΞΫηεΩʔઃఆ » AmazonLinuxͩͱΠϯετʔϧ؆୯ $ sudo yum install awslogs
"CloudWatch-Logs" » CloudWatch Logs Agent ҙ » సૹͰ͖ΔϩάϝοηʔδαΠζ » Agent͕1ճʹϓογϡͰ͖ΔαΠζ࠷େ
32KB » ͦΕΛ͑Δͱtruncate(Γ٧ΊΒΕΔ) » ରԠ͍ͯ͠Δϩάϩʔςʔγϣϯ » rename-recreatecopy-truncateͳͲ
"CloudWatch-Logs" » VPC Flow Logs
"CloudWatch-Logs" » CloudWatch Logs Metrics Filter Ͱϩά͔Β ಛఆจࣈྻͷϑΟϧλϦϯά͕Մೳ » ϑΟϧλϦϯά݁ՌΛड͚औΔΧελϜϝτϦΫε
Λ࡞͠ɺCloudWatchͷΞϥʔϜػೳͱΈ߹ ΘͤͯΞΫγϣϯΛ࣮ߦՄೳ
"CloudWatch-Logs" » Logs͔ΒϑΟϧλʔΛ࡞͍ͨ͠LogGroupΛબ͠ ͯCreateMetricsFilter
"CloudWatch-Logs" » ύλʔϯΛ࡞ͯ͠Assign Metrics
"CloudWatch-Logs" » MetricsͷৄࡉΛೖྗͯ͠CreateFilter͢Δ
"CloudWatch-Logs" » ϑΟϧλʔʹϚονͨ࣌͠ʹΧελϜϝτϦΫεσ ʔλ͕ૹΒΕΔΑ͏ʹͳΔ
"CloudWatch-Logs" » ར༻ྫ » CloudTrailͱ࿈ܞ͠ɺϚωδϝϯτίϯιʔϧ ͷૢ࡞ϩάΛCloudWatch-LogsʹૹΔ » rootΞΧϯτͰͷϩάΠϯɺ࿈ଓͨ͠ϩάΠ ϯࣦഊͳͲΛݕ͢ΔϑΟϧλʔΛ࡞ »
ͦΕΒʹϚονͨ͠ΒΧελϜϝτϦΫε͕ߋ৽͞ ΕͯΞϥʔϜൃੜ » ͓͖ͳΞΫγϣϯͰ௨
CloudWatch-Events
"CloudWatch-Events" » AWSϦιʔεͷมߋ(Πϕϯτ)Λݕͯ͠ɺετϦʔ Ϝୡ(ΞΫγϣϯΛى͜͢͜ͱ)͕Ͱ͖ΔαʔϏε » Πϕϯτ: EC2 instance state change
notification, AWS API Call, Auto Scaling, Schedule » ΞΫγϣϯ: AWS LambdaɺAmazon Kinesis StreamɺAmazon SNS, Bullet-inλʔήοτ » ϙʔϦϯάͰͷঢ়ଶࢹ͔Βͷղ์ » EventDrivenArchitectureͷத৺ʹͳΔͷ͔ͳʁ
"CloudWatch-Events" » EC2 instance state change notification » ಛఆɺ·͍ͨͣΕ͔ͷΠϯελϯεͷঢ়ଶʹมԽ ͕͋ͬͨΒετϦʔϜ
» runningʹͳͬͨΒɺͱ͔ɺrunningҎ֎ʹ ͳͬͨΒɺͳͲ » ঢ়ଶ͕stoppedʹͳͬͨΒrebootɺͱ͔ઃఆͰ ͖ͪΌ͏
"CloudWatch-Events" » AWS API Call, Auto Scalingಉ༷ » ΠϕϯτʹԠͯ͡ετϦʔϜ »
AWS API Call: RDSͷDeleteDBInstance͕ ݺΕͨΒͱ͔ » Auto Scaling: EC2 Launch Successfulͩ ͬͨΒͱ͔ » ࠓϝδϟʔͳαʔϏεʹ͔͠ରԠͯ͠ͳ͍͚Ͳࠓޙ ରԠαʔϏεΛ૿͢༧ఆ ͬͯawsͷϒϩάʹॻ͍ͯͨͷͰ૿͍͑ͯ͘ͱࢥ͏
"CloudWatch-Events" » Schedule » ཁcron » ࠷1ִؒͰΞΫγϣϯ࣮ߦ » ͜ΕͱAWS LambdaͰԿͰͰ͖Δͤ͠
✌('ω'✌ )ࡾ✌('ω')✌ࡾ( ✌'ω')✌
"CloudWatch-Events" » ΞΫγϣϯ » Bullet-inλʔήοτ » Create a Snapshot of
an EBS volume » Reboot EC2 instance » Terminate EC2 instance » Stop EC2 instance
"CloudWatch-Events" » ScheduleͱCreate a Snapshot of an EBS volumeΈ߹ΘͤͯຖεφοϓγϣοτࣗಈͰऔ ΕΔ
» ศརɻ͓खܰɻ » ͰSnapshotআʹରԠͯ͠ͳ͍ » আಉ͡Α͏ʹScheduleͰLambdaͰಈ͔ͯ͠ Ε͍͍
"CloudWatch-Events" » CloudWatchͷEvents͔ΒCreate͠ɺ EventSelectorͱTargetsΛઃఆ
"CloudWatch-Events" » NameͱదͳIAMRoleΛઃఆͯྃ͠
Zabbix
"Zabbix" » ossͷ౷߹ࢹιϑτΣΞ » ϑϩϯτΤϯυphp,όοΫΤϯυMySQL/ PostgresQL/SQLiteͱ͔ » ຊମCݴޠ » json-rpcͰapiૢ࡞Ͱ͖Δ
"Zabbix" » ઐ༻ͷZabbixAgentΛ༻ͯ͠OS෦ͷσʔλΛऔ ಘɺZabbixServerʹૹ৴ » ϓϩηεɺcpu/memoryͳͲͷϦιʔεใͳͲ
"Zabbix" » ࣗલͰΠϯελϯεཱͯͯӡ༻͢Δ͜ͱʹͳΔͷͰಛ ʹετϨʔδαΠζσʔλอଘظؒͳͲʹ੍ݶͳ ͍(͓ۚͷڐ͔͗͢Γ) » Ξϥʔτ௨ํ๏ࣗ༝ʹ࡞ΕΔ(alertscripts) » औಘ͢Δσʔλࣗ༝ʹ࡞ΕΔ (UserParameter,externalscripts)
» CloudWatchͷσʔλΛZabbixʹಥͬࠐΉ͜ͱͰσ ʔλอଘظؒ2िؒͷนΛಥഁʂ
"Zabbix" » CloudWatchͷσʔλΛZabbixʹ » APIܦ༝ » Fluentd » ଞʹ͓͖ͳΑ͏ʹ
"Zabbix" » APIܦ༝ » aws-sdk » aws-cli » UserParameter͔ΒεΫϦϓτΛݺͼग़ͯ͠σʔ λऔಘ͢Δύλʔϯ
» externalscriptsΛ࣮ߦͯ͠σʔλऔಘ͢Δύ λʔϯ
"Zabbix" » Fluentd » fluent-plugin-zabbix » fluent-plugin-cloudwatch » fluent-plugin-cloudwatchͰσʔλΛऔಘ͠ ͯfluent-plugin-zabbixͰZabbixʹૹΔ
"Zabbix" » RDS for MySQLͷσʔλ
"Zabbix" » RDS for MySQLͷσʔλ
"Zabbix" » σʔλΛZabbixʹ·ͱΊΔϝϦοτ » σʔλͷҰݩԽ » ௨ํ๏ҰݩԽ » σʔλอଘظؒͳͲͷ༷ࣗ༝ʹܾΊΒΕΔ »
ϝϯςφϯεͳͲࣗͰίϯτϩʔϧͰ͖Δ
"Zabbix" » Zabbixʹ·ͱΊΔσϝϦοτ » (Πϯελϯε͕ඞཁͳ)͓͕͔͔ۚΔ » CloudWatchͱࣗલZabbixɺͲ͕ͬͪݎ࿚͔ʁ » Πϯελϯεͷӡ༻େมͳͷͰʁ
"Zabbix" » Ͳ͏͍͏ํͰࢹ͍͔ͯ͘͠Α͘ߟ͑Δඞཁ͕͋Δ » ࠷ۙMackerelྲྀߦͬͯΔ͠AWSΠϯςάϨʔγϣ ϯग़ͨ͠ɺMonitoring as a Service͏ͷશ વ͋Γɻ
» ͦͦCloudWatch͕ͦΕͩ͠ɺCloudWatchʹ· ͱΊΔͷҰͭͷղ » ສ͕ҰCloudWatchʹোى͜ΔͱɺͦΕΛࣗͰ ίϯτϩʔϧͰ͖ͳ͍ɻࢹαʔϏεΛఏڙ͢Δฐࣾ ͱͯ͠NG
͜Μͳͱ͖Ͳ͏͢Δʁ
"͜Μͳͱ͖Ͳ͏͢Δʁ" » OSͷ෦ใΛऔಘ͍ͨ͠(ϓϩηεͱ͔) » RDSͷࢹΛ͍ͨ͠ » cloudwatchͷσʔλΛ2िؒҎ্อଘ͍ͨ͠ » ϝϯςφϯεΠϕϯτΛݕ͍ͨ͠ »
ϩάͷࢹΛ͍ͨ͠ » URLࢹ͍ͨ͠
"Warning!" » ฐࣾͰZabbixΛϝΠϯͷࢹγεςϜʹ࠾༻ͯ͠ ͍·͢ » ͦͷ্ͰฐࣾͰ͜͏͍ͯ͠Δɺͱ͍͏͓Ͱ͢ » ͦͷલఏͰ͓͕ਐΉͷͰͦͷྃ͝ঝ͍ͩ͘͞
"OSͷ෦ใΛऔಘ͍ͨ͠(ϓϩηεͱ͔)" » Zabbixͬͯૉʹσʔλऔಘ » proc.num ͱ͍͏ࢹΞΠςϜ͕༻ҙ͞Ε͍ͯΔ » CloudWatchΛ͍͍ͨਓΧελϜϝτϦΫεͰ » OSࣗମͷࢹجຊZabbix
"RDSͷࢹΛ͍ͨ͠" » ZabbixAgentΛRDSͷΑ͏ͳαʔϏεʹΠϯετʔ ϧͰ͖ͳ͍ » CloudWatchͷσʔλΛFluentdͬͯZabbixʹૹ ΓɺZabbixͰϞχλϦϯά » ͪΖΜCloudWatchͷΞϥʔϜػೳͰΞϥʔτ͋͛ Δ΄͏͕γϯϓϧ
"cloudwatchͷσʔλΛ2िؒҎ্อଘ͍ͨ͠" » Zabbixʹ·ͱΊΔ͜ͱͰղܾ » ࠷ۙͩͱDynamoDBʹஷΊ͓ͯ͘ύλʔϯ͋Δ༷ » ͨͩͦ͠ͷσʔλΛͦͷΑ͏ʹ͏ͷ͔ͪΌΜͱߟ ͑ͳ͍ͱ͍͚ͳ͍ » ͰʮͱΓ͓͔͋͑ͣͯ͠ͳ͍ͱޙͰඞཁʹͳΔ
͔͠Εͳ͍͠...ʯ͓͕ۚڐͤશવ͋Γͩͱ ࢥ͏ɻอݥΈ͍ͨͳͷɻ
"ϝϯςφϯεΠϕϯτΛݕ͍ͨ͠" » CloudWatch-Events + AWS Lambda + Slack » ࢦఆͨ͠ΞΧϯτͷશΠϯελϯεͷϝϯςφϯ
εΠϕϯτͷ༗ແΛνΣοΫ͢ΔLambda Function Λ࡞ » ͦΕΛCloudWatch-EventsͷScheduleͰ11ճ ࣮ߦ » ϝϯςφϯεΠϕϯτ͕͋ΕSlackʹ௨͍ͯ͠Δ
"ϝϯςφϯεΠϕϯτΛݕ͍ͨ͠"
"ϝϯςφϯεΠϕϯτΛݕ͍ͨ͠" » ZabbixͰਖ਼ৗʹಈ͍ͯΔ͔ͷࢹΛΓ͍ͨ » ࠓຖSlackʹಈ͍ͯ·͢Αʔ௨͖ͯΔ » ҟৗ͕͋ͬͨͱ͖͚ͩΘ͔Ε͍͍(ΊΜͲͯ͘͘͞ ࣮ͯ͠ͳ͍͚ͩ) » ࠓͷͱ͜ΖEC2ͱRDS͚ͩରԠɻElastiCacheͱ
͔...(ΊΜͲ࣮ͯͯ͘͘͞͠ͳ͍͚ͩ)
"ϩάͷࢹΛ͍ͨ͠" » OSͷϩάZabbixͷϩάࢹͬͯΔ » AWSαʔϏεͷϩάCloudWatch-Logs » ҰݩԽͰ͖ͯͳ͍... » Έத
"URLࢹΛ͍ͨ͠" » ZabbixͷWebࢹ » CloudWatch͋͘·ͰAWSαʔϏεͷϦιʔεΛݟ Δͷ » ͰCloudWatch-Events+AWS LambdaͰ࡞ΕΔ
"ࠓ͜ͷΞΧϯτ͍͘ΒͬͯΔΜͩΖʁ" » ϏϦϯάΞϥʔτ » ༗໊ͩͬͯ͠Δਓ͕΄ͱΜͲͩͱࢥ͏͚Ͳɺ͔ͩΒ ͦ͜ඞͣઃఆͯ͠΄͍͠ » AWSͷར༻ྉCloudWatchͷඪ४ϝτϦΫεͱͯ͠ ఏڙ͞Ε͍ͯΔͨΊɺΞϥʔϜઃఆͯ͠ΞΫγϣϯΛ ىͤ͜Δ
» Zabbixʹ·ͱΊͯτϦΨʔઃఆ͢ΔΑ͠ɻ͓͖ ͳΞΫγϣϯΛɻ
"·ͱΊ" » CloudWatch͔ΒAWSϦιʔεݟΕΔɻΞϥʔϜ+Ξ ΫγϣϯͰࢹͰ͖Δ » CloudWatch-Logsʹ͍ΖΜͳAWSαʔϏεͷϩά ͕ू͞ΕͯΔɻOSͷϩάࢹؚΊͯͲ͜ͰͲ͏ ࢹ͢Δ͔Α͘ߟ͑Δඞཁ͕͋Δ » CloudWatch-EventsΠϕϯτυϦϒϯΞʔΩςΫ
νϟத৺(ʹ͖ͬͱͳΔ) » ແཧʹAWSͰ݁ͤ͞Δඞཁͳ͍ɻͦΕͧΕʹ͋ ͬͨϕετͳબΛʂ
͓·͚
"ͳΜͪΌͬͯAmazon RDS for Aurora" » Amazon RDS for AuroraͰετϨʔδ͕ࣗಈ֦ ு͢Δ
» Amazon RDS for MySQLͰετϨʔδαΠζΛࣗ Ͱઃఆ͢Δ » ετϨʔδͷۭ͖༰ྔ͕গͳ͘ͳͬͨͱ͖ʹΞΫγϣ ϯى͜͢ΞϥʔϜઃఆͰ͖Δ
ϐίʔϯ!
ͦ͜ͰετϨʔδ֦ு ͨ͠Β͍͍Μ͡ΌͶʁ
"ͳΜͪΌͬͯAmazon RDS for Aurora"
"ͳΜͪΌͬͯAmazon RDS for Aurora" » ΠϕϯτυϦϒϯʂ » ฐࣾZabbixͰ͓ࢼ͠த » ࣗಈͰετϨʔδ֦ு͞Ε
ͨΒSlackʹ௨͞ΕΔ (ਤʹࡌͤΕͨ) » ֦ுதύϑΥʔϚϯε ԼͷڪΕ͋Δ͚ͲɺͦΕ͕ উखʹ࣮ߦ͞ΕΔ͜ͱΛڐ ༰Ͱ͖ΔͳΒ͋Γ
͋Γ͕ͱ͏͍͟͝·ͨ͠