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
630
AWS オブザーバビリティサービスアップデート
o11yfes2023
0
360
クロスアカウント/クロスリージョンのオブザーバビリティ
o11yfes2023
0
310
サーバレス、コンテナ、データベース特化型機能をご紹介。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
IHV like なユースケースへのOpenID Connect 関連仕様の適用事例
optim
0
270
あなたの知らないバージョン命名規則
sat
PRO
2
740
Rust×eBPFでEDRっぽいものをつくる
sunlife3
2
970
2027年のMetricKit
kantacky
0
180
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
8bit CPU 2026
koba789
7
2.9k
AI画像認識を活用したゲーム内決済処理検証の自動化
gree_tech
PRO
0
500
フィジカルAIの知識ゼロの僕でも AIを使えばここまでできた
tatsuya1970
0
180
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
20k
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.3k
会計事務所と顧問先の契約関係をOIDC・OAuthで表現する
terara
0
330
OAuth SPIFFE Client Authentication(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
270
Featured
See All Featured
Facilitating Awesome Meetings
lara
57
7.1k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
300
We Are The Robots
honzajavorek
0
310
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.5k
WENDY [Excerpt]
tessaabrams
11
39k
How STYLIGHT went responsive
nonsquared
100
6.2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
450
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
500
Git: the NoSQL Database
bkeepers
PRO
432
67k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
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