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
o11yfes
May 07, 2024
Technology
580
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
380
X-Ray SDKとDaemonのサポート終了と移⾏ガイド
o11yfes2023
0
570
AWS オブザーバビリティサービスアップデート
o11yfes2023
0
330
クロスアカウント/クロスリージョンのオブザーバビリティ
o11yfes2023
0
260
サーバレス、コンテナ、データベース特化型機能をご紹介。CloudWatch をもっと使いこなそう!
o11yfes2023
0
550
Amazon CloudWatch を使って NW 監視を行うには
o11yfes2023
0
970
CloudWatch 大好きなSAが語る CloudWatch キホンのキ
o11yfes2023
0
630
Amazon CloudWatchで始める エンドユーザー体験のモニタリング
o11yfes2023
0
610
Observabilityジャーニーを実現するためのAWSサービス:CloudWatch編
o11yfes2023
0
830
Other Decks in Technology
See All in Technology
事業価値を⽣み出すSREへ SREが担うべき意思決定の5層
kenta_hi
2
3.5k
最近評価が難しくなった
maroon8021
0
340
AIと共生する開発者プラットフォーム:バクラクのモノレポ×マイクロサービス基盤
sakajunquality
2
3.4k
「最後に責任を取るのはチーム」— 人間のPRレビューを最小化してアップデートしたメンタルモデル
jnishime_dresscode
0
550
Compose 新機能総まとめ / What's New in Jetpack Compose
yanzm
0
160
最適な自走を最小限の支援で — M&Aで拡大する組織で少人数SREが挑んだ1年 / SRE NEXT 2026
genda
0
1.1k
Claude Code公式skillで 自分の仕事を少しずつ手放そう!(Claude Code開発ノウハウ大公開スペシャル by クラスメソッド)
kaym
1
270
生成AIの活用/high_school2026
okana2ki
0
130
AI時代のエンジニアキャリアについて今一度考える
sakamoto_582
2
1.5k
貴方はどのエンジニアリングを磨くのか
hatyibei
0
120
AI時代の開発生産性は、個人技からチーム設計へ
moongift
PRO
2
170
ゼロをイチにする仕事が終わったあと
smasato
0
340
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
590
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
550
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The SEO Collaboration Effect
kristinabergwall1
1
500
The Pragmatic Product Professional
lauravandoore
37
7.4k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
460
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
610
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Embracing the Ebb and Flow
colly
88
5.1k
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