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
Observability はじめの一歩 CloudWatch Synthetics
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
o11yfes
May 07, 2024
Technology
590
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Observability はじめの一歩 CloudWatch Synthetics
o11yfes
May 07, 2024
More Decks by o11yfes
See All by o11yfes
⽣成 AI で進化する AWS オブザーバビリティ
o11yfes2023
0
420
X-Ray SDKとDaemonのサポート終了と移⾏ガイド
o11yfes2023
0
620
AWS オブザーバビリティサービスアップデート
o11yfes2023
0
350
クロスアカウント/クロスリージョンのオブザーバビリティ
o11yfes2023
0
300
サーバレス、コンテナ、データベース特化型機能をご紹介。CloudWatch をもっと使いこなそう!
o11yfes2023
0
550
Amazon CloudWatch を使って NW 監視を行うには
o11yfes2023
0
1k
CloudWatch 大好きなSAが語る CloudWatch キホンのキ
o11yfes2023
0
640
Amazon CloudWatchで始める エンドユーザー体験のモニタリング
o11yfes2023
0
620
Observabilityジャーニーを実現するためのAWSサービス:CloudWatch編
o11yfes2023
0
840
Other Decks in Technology
See All in Technology
SmartHR Engineering Team Deck
smarthr
1
3k
トヨタ⽣産⽅式(TPS)⼊⾨
recruitengineers
PRO
3
1.1k
システム思考で問題に対処する
yussak
0
350
Webアクセシビリティ入門 2026
recruitengineers
PRO
3
690
制約理論(ToC)入門 2026版
recruitengineers
PRO
9
2.6k
도구에서 동료까지: 10년차 AI 스타트업의 AI 적응기
inureyes
PRO
0
250
What's new in Go 1.27?
ciarana
0
280
社内の7割が使うデータ基盤を、 データチーム2人で回すためにやったこと
koh_yoshi
4
1.5k
ホームラボ紹介
y_sera15
0
210
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
Kiro入門|仕様駆動開発で変わるAI時代の開発スタイル
cmkudo
0
200
ブラウザ研修 2026
recruitengineers
PRO
7
1.2k
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Odyssey Design
rkendrick25
PRO
2
770
It's Worth the Effort
3n
188
29k
Making the Leap to Tech Lead
cromwellryan
135
10k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Building Applications with DynamoDB
mza
96
7.2k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
460
Documentation Writing (for coders)
carmenintech
77
5.5k
Optimising Largest Contentful Paint
csswizardry
37
3.9k
Why Our Code Smells
bkeepers
PRO
340
58k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Transcript
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Observability はじめの⼀歩 CloudWatch Synthetics 堀 貴裕 アマゾンウェブサービスジャパン合同会社 ソリューションアーキテクト 1
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. ⾃⼰紹介 2 氏名 堀 貴裕(ほり たかひろ) 役職 主に製造業のお客様をご支援 技術担当 Solutions Architect 好きな分野 AWS サービス オブザーバビリティ、Amazon CloudWatch
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 本⽇のアジェンダ • オブザーバビリティ獲得は何から始めたら良いのか︖ ~ 外形監視 ~ • Amazon CloudWatch Synthetics ご紹介 • Amazon CloudWatch Synthetics をライブデモ • まとめ 3
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. オブザーバビリティ何から始めれば良いのか︖ • ⾊々なことを学んだが、具体的に何をどのような⼿段で始めれば良いのか︖ 4 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. AWS Observability Maturity Model Stage 成熟度 Stage 1: 基本的なモニタリング Stage 2: 中級レベルの モニタリング Stage 3: ⾼度な オブザーバビリティ Stage 4: 予測的 オブザーバビリティ テ レ メ ト リ デ ー タ の 収 集 テ レ メ ト リ の 分 析 と イ ン サ イ ト 相 関 関 係 と 異 常 検 知 自 動 か つ 予 測 的 な 根 本 原 因 の 特 定 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Stage 4 : 予測的オブザーバビリティ 自動かつ予測的な根本原因の特定 ⽬指す状態 • AI/MLによる根本原因の特定 • ⾃動復旧に向けた仕組み ⾏うこと • 継続的な改善 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 現在の機能(22項⽬)で他のユースケースにも AWSサービス名 概要 ⼤阪リージョン 有・無 CW Dashboard ダッシュボード 有 CW Alarm アラーム 有 CW Logs ログ 有 CW Log Anomalies ログ異常検知(機械学習機能) 有 CW Log Live Tail ライブテール 有 CW Logs Insights ログ分析 有 CW Metrics メトリクス(メトリクス分析もこちら) 有 CW Metrics Explorer メトリックス検索 有 CW Metrics Stream メトリックスのリアルタイム連携 有 X-Ray traces トレース 有 CW Events ※Event Bridgeに統合 イベント 有 CW Application Signals (Preview) SLO/SLIベースとしたアプリケーションモニタ リング機能 無 CW Synthetics 外形監視 有 CW RUM リアルユーザーモニタリング 有 CW Evidently フィーチャーフラグA/Bテスト 無 AWSサービス名 概要 ⼤阪リージョン 有・無 CW Internet Monitor インターネット監視 有 CW Network Monitor ネットワーク監視 無 CW Container Insights コンテナ分析 有 CW Lambda Insights Lambda分析 有 CW Contributor Insights ログの時系列分析 有 CW Application Insights アプリケーション分析 有 CW EC2 Resource Health EC2の健全性・パフォーマンス可 視化 有 さまざまな機能を組み合わせて サービスに⼤切なものを監視する ※CWはCloudWatchの略 © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. CloudWatch / X-Ray は最初の選択肢 • AWS サービスに対するビルトインの メトリクスやログ、トレースが利⽤可能 特に準備不要でテレメトリデータの収集を始められる e.g. EC2、RDS、Lambda、ECS、S3、DynamoDB…more • AWS サービスとのインテグレーションが容易 テレメトリデータの S3 へのバックアップ Alarm からのオートメーション処理 …more • 1 プラットフォームで完結できる 再掲 CloudWatchでObservabilityを始められるのはわかった。 では、各Stageで何ができるのか︖
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 最初に監視を追加すべきところは︖ • ユーザー体験改善のためにはユーザー視点でアプリケーションが正常か 監視することがまず最重要 § アプリにアクセスできるか︖レイテンシが正常範囲か︖などなど 5 AWS Cloud アプリケーション コンテンツ 異常なくサクサク⾒れる
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. なるべく楽に始められる監視が良い • 現状動作しているアプリケーションになるべく⼿を加えたくない § 構成変更はリスクがあるのですぐに⾏えない § オブザーバビリティのために追加の開発コストをなるべくかけたくない 6 アプリの AWS 設定変更 アプリの追加コーディング
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. ここから始めよう外形監視 • 定常的に計測プログラムがアクセスしてユーザー視点のデータを取得する § アプリケーションのリソース、コードの変更不要 § 実際のユーザーアクセスがなくても監視できる 7 AWS Cloud アプリケーション ユーザー 計測プログラム アクセス アクセス
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS での外形監視 ~CloudWatch Synthetics~ • 外形監視を⾏うためのサーバーの運⽤が不要なマネージドサービス 8 Amazon CloudWatch Synthetics 東京・⼤阪リージョンほか様々なリージョンで使⽤可能
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 9 Amazon CloudWatch Synthetics による Monitoring 別リージョン Publicアクセス 可能なリソース 東京リージョン (Synthetics が稼働) Internet CloudWatch Synthetics Synthetics API Gateway VPC HTTP or HTTPS HTTP or HTTPS 「Canary」を定義して、その定義 に基づいてヘッドレスブラウザが 監視対象の URL にアクセス • CloudWatch Synthetics は、Web アプリケーションと API を簡単に監視できるようにするサービスです。 • 実際のユーザートラフィックがなくてもエンドポイントを継続的・定期的にテストすることができます。 • 設定したしきい値に基づいてエラーがあればアラートを上げることができます。
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 10 Canary Blueprint Canary の実体は Node.js/Python で実装される Lambda 関数で、6 種類の Blueprint が⽤意されており、基本的な⽤途であればコーディングが不要です。 No. Blueprint 特徴 Node.js Python 1 ハートビートのモニタリング 指定した URL にアクセスして、ページのスクリーン ショットと HTTP アーカイブファイル (HAR ファイル) を保存 ◦ ◦ 2 API Canary REST API に対してリクエストを送信して、応答をテスト ◦ ◦ 3 リンク切れチェッカー テスト対象のURL内のすべてのリンクを収集し、 リンク切れがないかテスト ◦ - 4 Canary レコーダー Google Chrome の拡張機能である CloudWatch Synthetics Recorder を利用して、ユーザ操作を 記録し、テスト ◦ - 5 GUI ワークフロービルダー Web サイト上のユーザ操作ができるかを GUI ベースで 作成してテスト ◦ ◦ 6 ビジュアルモニタリング Web サイトの表示が変化していないかをベースラインと 比較し、テスト ◦ - Canary 設計図の使⽤ https://docs.aws.amazon.com/ja_jp/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Blueprints.html
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 11 Amazon CloudWatch Synthetics 料⾦ (2024/4現在) ① CloudWatch Synthetics 利⽤料 1回の Canary 実⾏あたり 0.0019 USD (※東京リージョン) 毎⽉ 100 回 までの無料利⽤枠あり ⽉あたりに実⾏される Canary 実⾏回数に対しての利⽤料 ② 関連サービス利⽤料 1. Canary としての Lambda 関数の実⾏にかかる利⽤料 2. S3 ストレージ利⽤料 (結果データやスクリプトの保存に伴う利⽤料) 3. CloudWatch Alarms, CloudWatch Logs, X-Ray 等の利⽤料 https://aws.amazon.com/jp/cloudwatch/pricing/
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Amazon CloudWatch Synthetics 料⾦試算 • 15 分に 1 回実⾏する Canary を作成し、それぞれにアラームを追加して データを 1 ヶ⽉保存 § 1 Canary x 4 実⾏ (/h) x 24(h) x 31(days) = 2,976 Canary 実⾏ 12 サービス 数量 単価 (USD) 料⾦ (USD) Amazon CloudWatch Synthetics 2,976 0.0019 5.65 Amazon CloudWatch Alarms 1 0.10 0.10 AWS Lambda 2,976 1GB, 20秒 0.0000166667 /(GB-秒) 0.99 ⽉額合計料⾦ : 7.05 (USD) 東京リージョンで試算 (2024/04) ⽉額合計⾦額は Amazon CloudWatch Logs と Amazon S3, AWS Lambda リクエストの料⾦が $0.31 追加された結果です
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. 13 作ってみよう Amazon CloudWatch Synthetics AWS Cloud Virtual private cloud (VPC) Elastic Load Balancing Amazon EC2 Amazon RDS Synthetics User アクセス 外形監視
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. まとめ • オブザーバビリティ獲得の第⼀歩はユーザー体験の監視 • ユーザー体験の監視は外形監視で楽に実現 • 外形監視は Amazon CloudWatch Synthetics で簡単に実現 14 明⽇から始めましょう︕︕
© 2024, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Thank you! 15