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
91
Tried to create a deployment pipeline of AutoML Vision.
youyo
0
58
API GatewayのWebSocket対応について
youyo
0
690
GCRと脆弱性検査
youyo
0
180
goodbye-ec2
youyo
0
570
それでも僕はzabbixと生きていく
youyo
1
450
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
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
180
アジャイルでの品質の進化 Agile in Motion vol.1/20241118 Hiroyuki Sato
shift_evolve
0
180
Platform Engineering for Software Developers and Architects
syntasso
1
520
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
760
Terraform Stacks入門 #HashiTalks
msato
0
360
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
390
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
DynamoDB でスロットリングが発生したとき/when_throttling_occurs_in_dynamodb_short
emiki
0
260
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
OTelCol_TailSampling_and_SpanMetrics
gumamon
1
220
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
520
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
110
Site-Speed That Sticks
csswizardry
0
31
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Fireside Chat
paigeccino
34
3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
A better future with KSS
kneath
238
17k
Bash Introduction
62gerente
608
210k
Adopting Sorbet at Scale
ufuk
73
9.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
430
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
900
Statistics for Hackers
jakevdp
796
220k
How to Ace a Technical Interview
jacobian
276
23k
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ʹ௨͞ΕΔ (ਤʹࡌͤΕͨ) » ֦ுதύϑΥʔϚϯε ԼͷڪΕ͋Δ͚ͲɺͦΕ͕ উखʹ࣮ߦ͞ΕΔ͜ͱΛڐ ༰Ͱ͖ΔͳΒ͋Γ
͋Γ͕ͱ͏͍͟͝·ͨ͠