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
94
Tried to create a deployment pipeline of AutoML Vision.
youyo
0
62
API GatewayのWebSocket対応について
youyo
0
720
GCRと脆弱性検査
youyo
0
190
goodbye-ec2
youyo
0
600
それでも僕は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
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
190
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
40
17k
[トレノケ雲の会 mod.13] 3回目のre:Inventで気づいたこと -CloudOperationsを添えて-
shintaro_fukatsu
0
110
最近のSfM手法まとめ - COLMAP / GLOMAPを中心に -
kwchrk
8
1.5k
Yahoo! ズバトクにおけるフロントエンド開発
lycorptech_jp
PRO
0
110
非機能品質を作り込むための実践アーキテクチャ
knih
6
1.7k
React Routerで実現する型安全なSPAルーティング
sansantech
PRO
2
330
事業貢献を考えるための技術改善の目標設計と改善実績 / Targeted design of technical improvements to consider business contribution and improvement performance
oomatomo
0
170
普通のエンジニアがLaravelコアチームメンバーになるまで
avosalmon
0
580
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
320
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.5k
LINE Developersプロダクト(LIFF/LINE Login)におけるフロントエンド開発
lycorptech_jp
PRO
0
150
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
The World Runs on Bad Software
bkeepers
PRO
66
11k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Docker and Python
trallard
42
3.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
5
180
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Fireside Chat
paigeccino
34
3.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
190
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
A designer walks into a library…
pauljervisheath
205
24k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
1
120
Gamification - CAS2011
davidbonilla
80
5.1k
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ʹ௨͞ΕΔ (ਤʹࡌͤΕͨ) » ֦ுதύϑΥʔϚϯε ԼͷڪΕ͋Δ͚ͲɺͦΕ͕ উखʹ࣮ߦ͞ΕΔ͜ͱΛڐ ༰Ͱ͖ΔͳΒ͋Γ
͋Γ͕ͱ͏͍͟͝·ͨ͠