Inicio
Explorar
Enviar búsqueda
Cargar
Iniciar sesión
Registrarse
Publicidad
Check these out next
AWS IoT SiteWise のご紹介 (AWS IoT Deep Dive #5)
Amazon Web Services Japan
AWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@Edge
Amazon Web Services Japan
20180425 AWS Black Belt Online Seminar Amazon Relational Database Service (Am...
Amazon Web Services Japan
20210309 AWS Black Belt Online Seminar AWS Audit Manager
Amazon Web Services Japan
[AWS Start-up ゼミ] よくある課題を一気に解説!〜御社の技術レベルがアップする 2017 夏期講習〜
Amazon Web Services Japan
Amazon Kinesis Familyを活用したストリームデータ処理
Amazon Web Services Japan
Amazon Kinesis Analytics によるストリーミングデータのリアルタイム分析
Amazon Web Services Japan
AWS導入から3年 AWSマルチアカウント管理で変わらなかったこと変えていったこと
Takayuki Ishikawa
1
de
97
Top clipped slide
JAWS-UG 初心者支部 #31 監視編 サーバーのモニタリングの基本を学ぼう
1 de Sep de 2020
•
0 recomendaciones
2 recomendaciones
×
Sé el primero en que te guste
ver más
•
6,695 vistas
vistas
×
Total de vistas
0
En Slideshare
0
De embebidos
0
Número de embebidos
0
Descargar ahora
Descargar para leer sin conexión
Denunciar
Tecnología
2020-09-01に実施したハンズオンの手順書です https://jawsug-bgnr.connpass.com/event/185492/
Hiroki Uchida
Seguir
Solution Architect en Amazon Web Services Japan
Publicidad
Publicidad
Publicidad
Recomendados
AWS Tools for Windows PowerShell
Amazon Web Services Japan
2.2K vistas
•
35 diapositivas
20191002 AWS Black Belt Online Seminar Amazon EC2 Auto Scaling and AWS Auto S...
Amazon Web Services Japan
23.1K vistas
•
105 diapositivas
20200212 AWS Black Belt Online Seminar AWS Systems Manager
Amazon Web Services Japan
25.3K vistas
•
77 diapositivas
20191029 AWS Black Belt Online Seminar Elastic Load Balancing (ELB)
Amazon Web Services Japan
65.8K vistas
•
83 diapositivas
20200617 AWS Black Belt Online Seminar Amazon Athena
Amazon Web Services Japan
18.5K vistas
•
76 diapositivas
202110 AWS Black Belt Online Seminar AWS Site-to-Site VPN
Amazon Web Services Japan
7.3K vistas
•
94 diapositivas
Más contenido relacionado
Presentaciones para ti
(20)
AWS IoT SiteWise のご紹介 (AWS IoT Deep Dive #5)
Amazon Web Services Japan
•
1.7K vistas
AWS BlackBelt Online Seminar 2017 Amazon CloudFront + AWS Lambda@Edge
Amazon Web Services Japan
•
79.5K vistas
20180425 AWS Black Belt Online Seminar Amazon Relational Database Service (Am...
Amazon Web Services Japan
•
51.9K vistas
20210309 AWS Black Belt Online Seminar AWS Audit Manager
Amazon Web Services Japan
•
2.1K vistas
[AWS Start-up ゼミ] よくある課題を一気に解説!〜御社の技術レベルがアップする 2017 夏期講習〜
Amazon Web Services Japan
•
10.5K vistas
Amazon Kinesis Familyを活用したストリームデータ処理
Amazon Web Services Japan
•
8.2K vistas
Amazon Kinesis Analytics によるストリーミングデータのリアルタイム分析
Amazon Web Services Japan
•
9.2K vistas
AWS導入から3年 AWSマルチアカウント管理で変わらなかったこと変えていったこと
Takayuki Ishikawa
•
3.1K vistas
AWS Black Belt Online Seminar Elastic Load Balancing
Amazon Web Services Japan
•
16.3K vistas
클라우드를 활용한 기업 가치 극대화- 방희란 AWS시니어 어카운트 매니저/ 정재표, 대한항공ERP 재무담당 과장:: AWS Summit...
Amazon Web Services Korea
•
230 vistas
Infrastructure as Code (IaC) 談義 2022
Amazon Web Services Japan
•
3.1K vistas
2022年ASP.NETCore2.2~6.0の旅.pptx
Masanori Masui
•
555 vistas
AWS Black Belt Online Seminar 2017 Amazon Kinesis
Amazon Web Services Japan
•
147.3K vistas
AWS Black Belt Online Seminar AWSで実現するDisaster Recovery
Amazon Web Services Japan
•
39.8K vistas
20200811 AWS Black Belt Online Seminar CloudEndure
Amazon Web Services Japan
•
5.9K vistas
AWS Black Belt Online Seminar 2017 Amazon ElastiCache
Amazon Web Services Japan
•
37K vistas
AWS Black Belt Techシリーズ AWS Elastic Beanstalk
Amazon Web Services Japan
•
21.6K vistas
AWS Black Belt Online Seminar 2018 AWS Well-Architected Framework
Amazon Web Services Japan
•
22.6K vistas
20191127 AWS Black Belt Online Seminar Amazon CloudWatch Container Insights で...
Amazon Web Services Japan
•
4.8K vistas
AWSとオンプレミスを繋ぐときに知っておきたいルーティングの基礎知識(CCSI監修!)
Trainocate Japan, Ltd.
•
11.3K vistas
Similar a JAWS-UG 初心者支部 #31 監視編 サーバーのモニタリングの基本を学ぼう
(20)
[CTO Night & Day 2019] CTO のためのセキュリティ for Seed ~ Mid Stage #ctonight
Amazon Web Services Japan
•
1.7K vistas
AWS IoT サービスこの1年の進化
Jun Ichikawa
•
940 vistas
20200219-iot@loft#8_security_of_smarthome
Amazon Web Services Japan
•
1.7K vistas
AWS All Stars ~Lightning Talks x 13~
Amazon Web Services Japan
•
5.6K vistas
Gaming cicd-pipeline gaming-technight-2
Amazon Web Services Japan
•
5.8K vistas
20180613 AWS Black Belt Online Seminar AWS Cloud9 入門
Amazon Web Services Japan
•
11K vistas
IaaS型パブリッククラウド「IBM SoftLayer」とは
Kimihiko Kitase
•
2.8K vistas
ハイブリットクラウド環境におけるモダンアプリケーション開発
政雄 金森
•
465 vistas
AWS_reInforce_2022_reCap_Ja.pdf
Hayato Kiriyama
•
113 vistas
AWS IoT Coreを オンプレミス環境と使う際の アーキテクチャ例 (AWS IoT Deep Dive #5)
Amazon Web Services Japan
•
1.9K vistas
Serverless時代のJavaについて
Amazon Web Services Japan
•
12.6K vistas
03_AWS IoTのDRを考える
Amazon Web Services Japan
•
2K vistas
Management & Governance on AWS こんなこともできます
Amazon Web Services Japan
•
5K vistas
機密データとSaaSは共存しうるのか!?セキュリティー重視のユーザー層を取り込む為のネットワーク通信のアプローチ
Amazon Web Services Japan
•
832 vistas
セキュリティ設計の頻出論点
Tomohiro Nakashima
•
496 vistas
[CTO Night & Day 2019] グローバルのサービス展開に向けたマルチリージョンアーキテクチャ- #ctonight
Amazon Web Services Japan
•
1.8K vistas
[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編
Amazon Web Services Japan
•
6.5K vistas
20151030 オープンデータとセキュリティon aws
takaoka susumu
•
1.2K vistas
[AWSマイスターシリーズ] AWS Client Side SDK -Android,iOS & JavaScript-
Amazon Web Services Japan
•
9.5K vistas
AWS Black Belt Online Seminar 2018 Amazon Sumerian
Amazon Web Services Japan
•
4.7K vistas
Publicidad
Último
(20)
JSTQB_テストプロセスの概念モデル.pdf
akipii Oga
•
242 vistas
Forguncy製品概要.pptx
フォーガンシー
•
97 vistas
20230523_IoTLT_vol99_kitazaki_v1.pdf
Ayachika Kitazaki
•
112 vistas
GitHub と Azure でアプリケーションとインフラストラクチャの守りを固めるDevSecOps
Kazumi IWANAGA
•
6 vistas
JSTQB_テストマネジメントとレビュープロセス.pdf
akipii Oga
•
214 vistas
SoftwareControl.pdf
ssusercd9928
•
15 vistas
HTTPの仕組みについて
iPride Co., Ltd.
•
9 vistas
コードレビュー改善のためにJenkinsとIntelliJ IDEAのプラグインを自作してみた話
Rakuten Group, Inc.
•
10 vistas
20230602_enebular_meetup_kitazaki_v1.pdf
Ayachika Kitazaki
•
27 vistas
【DL輪読会】大量API・ツールの扱いに特化したLLM
Deep Learning JP
•
93 vistas
JSONEncoderで詰まった話
とん とんぼ
•
144 vistas
Oracle Cloud Infrastructure:2023年5月度サービス・アップデート
オラクルエンジニア通信
•
32 vistas
点群SegmentationのためのTransformerサーベイ
Takuya Minagawa
•
13 vistas
ネットワークパケットブローカー市場.pdf
HinaMiyazu
•
7 vistas
Wandb LLM Webinar May 30 2023 (配布用).pdf
Yuya Yamamoto
•
19 vistas
社内ソフトスキルを考える
infinite_loop
•
87 vistas
モバイル・クラウド・コンピューティング-データを如何に格納し、組み合わせ、情報として引き出すか
Masahiko Funaki
•
2 vistas
初学者のためのプロンプトエンジニアリング実践.pptx
Akifumi Niida
•
469 vistas
OpenJDKのコミッタってどんなことしたらなったの?解決してきた技術課題の事例から見えてくる必要な知識と技術(JJUG CCC 2023 Spring)
NTT DATA Technology & Innovation
•
137 vistas
量子論.pdf
hiro150493
•
8 vistas
JAWS-UG 初心者支部 #31 監視編 サーバーのモニタリングの基本を学ぼう
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. アマゾンウェブサービスジャパン株式会社 Solution Architect 内田 大樹 / Hiroki Uchida @nikuyoshi JAWS-UG 初心者支部 #31 監視編 サーバーのモニタリングの基本を学ぼう #jawsug_bgnr 資料: SlideShareのURL 資材: https://bit.ly/2TeM2wT
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 自己紹介 内田 大樹 (うちだ ひろき) インダストリソリューション部 ソリューションアーキテクト 前職までの経験 通信会社でアプリケーション開発、監視、インフラ構 築する部署に所属。 好きなAWSのサービス AWS Command Line Interface AWS CDK @nikuyoshi 2
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 本ハンズオンの狙い • 110 分でAWSにおけるサーバーの監視 方法をクイックに学んでいただく • 説明 よりも 体験 を重視 • Next Action に繋げていただきたい ラーニングピラミッド 👉 講義 読書 視聴覚 デモ グループ討論 自ら体験する 他の人に教える 3
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 本コースのゴール/前提条件、前提知識 • 本コースのゴール • クラウドにおける監視の考え方を理解する • Amazon Elastic Computing Cloud(EC2)、Elastic Load Balancing(ELB)、Amazon Relational Database Service(RDS)を利用したWebシステムの監視方法を学ぶこと • 本コースの前提条件、前提知識 • AWS アカウントをお持ちであること • ハンズオンの作業が同一AWSアカウントの他のリソースに影響が出る場合がある • ハンズオン用にAWSアカウントを取得していただくことを推奨する • 以下のAWS サービスの基礎知識を持っていること。必須ではない。 • Amazon Virtual Private Cloud (VPC) • Amazon EC2 • Amazon RDS 4
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 本日のアジェンダ 1. 事前準備と関連サービス紹介 2. Amazon CloudWatchのハンズオン ①EC2、ALB、RDSのメトリクス確認 3. Amazon CloudWatchのハンズオン ②EC2のディスク使用率90%以上時のアラー ト発報 4. Amazon CloudWatchのハンズオン ③WordPressのアクセスログ、エラーログ確 認 5. 本コースのまとめ、リソース削除 5
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 本日のアジェンダ 1. 事前準備と関連サービス紹介 2. Amazon CloudWatchのハンズオン ①EC2、ALB、RDSのメトリクス確認 3. Amazon CloudWatchのハンズオン ②EC2のディスク使用率90%以上時のアラー ト発報 4. Amazon CloudWatchのハンズオン ③WordPressのアクセスログ、エラーログ確 認 5. 本コースのまとめ、リソース削除 6
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 事前準備と関連サービス紹介
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 資材のダウンロード 以下のURLから資材と手順書をダウンロードしてください。 資材: https://bit.ly/2TeM2wT 手順書: SlideShareのURL 8
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 事前準備 #1 画面右上のリージョンを 選択し、東京リージョンに なっていることを確認 ↓ サービス検索窓に CloudFormationと入力し、 管理画面に移動 9
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 事前準備 #2 スタックの作成 ボタンをクリック 10
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 事前準備 #3 以下の通りに選択し、ダウンロードした資材の monitoring-1.yaml をアップ ロード後、次へ ボタンをクリック 11
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 事前準備 #4 スタックの名前に monitoring-1 を入力し、他の項目はデフォルト値のまま 次へ ボタンをクリック。次の画面も変更することなく、次へ ボタンをクリック 12
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 事前準備 #5 以下のチェックボックスにチェックを入れて、 スタックの作成 ボタンをクリック 13
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 事前準備 #6 スタックの作成の完了を待つ間、後続の手順を読んでおいてください。 10分程度かかります。 14
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CloudFormation実行時の注意点 • AWS Hands-on for Beginners スケーラブル ウェブサイト構築編※1で作成 した構成と異なる。 CloudWatch Agentがインストールされている構成に なっているため、別物だと思ってCloudFormationを必ず実行すること • デフォルトでは1つのリージョンで作成できるVPCは5個までとなっているた め、既に5個作られている場合は既存のVPCを削除するか、別リージョンで 実行すること • 同一のスタック名(例: monitoring-1)がCloudFormationで実行されていな いこと。既に実行されていた場合、そのスタックを消すか、別名称のスタッ クで作成すること • 新規のAWSアカウントでない場合、デフォルトVPCが存在せず失敗すること があるため、デフォルトVPCを作成すること ※1 実施していなければ無視して問題ありません。 15
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark.© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 作業が終わりましたら説明に移ります 講師の画面を見てください
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon VPC (Virtual Private Cloud) • VPCでクラウド内にプライベートネットワークを構築 • 既存データセンターの延長としてAWSを利用 VPC AWS Cloud オンプレミス VPN Connection ユーザ(社内) プライベート サブネット Direct Connect パブリック サブネット インターネット 分離したネットワーク領域を作成 17
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon EC2 (Elastic Compute Cloud) • 数分で起動、1秒ごとの従量課金で利用可能な仮想サーバ • 独自のHW/Hypervisorにより最適化された性能を提供 • 多数のOSをサポート、ライセンス費用込みで従量課金 • 自由にソフトウェアのインストールが可能 Nitro hypervisor Network Storage Nitro Security Chip EC2インスタンス Server Nitro System ミドルウェア アプリケーション OS リクエストしてから数分で、 ここまで準備される 電源、ラック等 ハイパーバイザー ネットワーク 仮想マシン アプリ、ミドルウェア、 監視ツール等を自由に導入可能 18
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Elastic Load Balancing (ELB) オンプレミスの「L4/L7ロードバランサ」に相当 VPC AWS Cloud Availability Zone 1 Availability Zone 2 Elastic Load Balancing EC2 EC2 myELBxxx.elb.amazonaws.com • 複数EC2インスタンスに負荷分散 • 高い耐障害性を実現 • ELBの性能増減は自動的に実施 • 複数アベイラビリティゾーンに 跨った負荷分散 ALB(Application Load Balancer) レイヤー7 NLB(Network Load Balancer) レイヤー4 数百万リクエスト/秒 19
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon RDS (Relational Database Service) • フルマネージドなリレーショナルデータベースサービス • MySQL、Oracle、 SQL Server、 PostgreSQL、MariaDB、Auroraを選択可 能 • バックアップやフェイルオーバー、パッチ適用の自動化、さらには以下の構 成に対応したDBを数クリックで利用可能 スケールアップ マルチAZ構成 リードレプリカ AZ1 AZ2 耐障害性向上 読み込みの負荷分散処理能力向上 20
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. AWS CloudFormation • シンプルなテキストファイル(テンプレート)を使用して、リージョンとアカウントで アプリケーションに必要とされるAWSリソースをプロビジョニングできるサービス • プロビジョニングされたAWSリソースに対する変更/削除も可能で、ソフトウェアに対 して行うのと同じ方法でAWSインフラを管理できる • 追加料金なし(プロビジョニングされたAWSリソース分の料金のみ発生) 作成/変更/削除 作成するリソースの定義 リソースの集合 リソースの 作成/変更/削除 Template CloudFormation Stack Amazon RDS VPC Amazon EC2 21
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Amazon CloudWatch の概要 CloudWatch はモニタリングに関する様々な機能を提供 CloudWatch Alarms CloudWatch Events CloudWatch Metrics CloudWatch Logs CloudWatch Logs Insights AWSサービス お客様システム CloudWatch Dashboardstime-baseevent-base メトリクスを送信 ログを送信 メトリクスに応じた アクションの実行 ログの可視化 イベントに応じた ターゲットによる処理 メトリクスを送信 22
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CloudFormationでデプロイする プライベートサブネット-1c 10.0.3.0/24 パブリックサブネット-1a 10.0.0.0/24 プライベートサブネット-1a 10.0.2.0/24 パブリックサブネット-1c 10.0.1.0/24 インターネット ゲートウェイ VPC: 10.0.0.0/16 RDS (Master) ELB EC2 インターネット ユーザー RDS (Slave) Word Press アベイラビリティーゾーン 1c アベイラビリティーゾーン 1a EC2 Word Press CloudWatch Metrics CloudWatch Logs VPC、EC2、RDS、ELBをま とめてCloudFormationでデ プロイします 23
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 事前準備 #7 以下のように、CloudFormationの管理画面にてステータスが CREATE_COMPLETE になってい れば準備完了です。 24
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 事前準備 #8 CloudFormationの管理コンソール > monitoring-1 > 出力タブから、EC2の DNS名をコピーし、WordPressサーバーにアクセスします。EC2WebServer01、 EC2WebServer02の2つを設定していきます。 25
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 事前準備 #9 作成した RDS の DB 設定に基づき、WordPressのデータベース設定を行います ※ダウンロードした資材の中にもテキストファイル ( wordpress-settings.md ) があるためご活用ください データベース名: wordpress ユーザー名: dbmaster パスワード: H&ppyHands0n データベースのホスト名: RDSのエン ドポイント テーブル接頭辞: wp_ 26
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 事前準備 #10 サイトのタイトル: Monitoring #1 ユーザー名: admin パスワード: 出力された文字列をコ ピーしておいてください メールアドレス: username@example.com (実際には 送信されません) 検索エンジンでの表示: チェックを入 れる ※ダウンロードした資材の中にもテキストファイル ( wordpress-settings.md ) があるためご活用ください 27
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark.© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 作業が終わりましたら説明に移ります 講師の画面を見てください
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 本日のアジェンダ 1. 事前準備と関連サービス紹介 2. Amazon CloudWatchのハンズオン ①EC2、ALB、RDSのメトリクス確認 3. Amazon CloudWatchのハンズオン ②EC2のディスク使用率90%以上時の アラート発報 4. Amazon CloudWatchのハンズオン ③WordPressのアクセスログ、 エラーログ確認 5. 本コースのまとめ、リソース削除 29
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. メトリクス監視が何故必要か よくある問題 • サーバーが過負荷で応答できない • サービスが使えない • 良い顧客体験を提供できない 測定すべき項目 • リソース監視 (例: CPU使用率、メモリ使用率) • アプリケーション性能管理 (例: アプリケーションの処理時間) 30
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CloudWatch Metrics CloudWatch に発行されたメトリクスを収集し、統計を取得 CloudWatch Alarms CloudWatch Events CloudWatch Metrics CloudWatch Logs CloudWatch Logs Insights AWSサービス お客様システム CloudWatch Dashboardstime-baseevent-base メトリクスを送信 ログを送信 メトリクスに応じた アクションの実行 ログの可視化 イベントに応じた ターゲットによる処理 メトリクスを送信 31
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CloudWatch Metrics メトリクス • CloudWatchに発行された時系列のデータポイントのセット • メトリクス名を持つ • データポイントはタイムプスタンプと測定単位を保持 • メトリクスは作成されたリージョンにのみ存在 名前空間 • CloudWatchメトリクスのコンテナ • 異なる名前空間のメトリクスは相互に切り離される • AWSサービスでは AWS/<service>が使用される(例: AWS/EC2) ディメンション • メトリクスを一意に識別する名前/値のペア(例:InstanceId=i-12345678) 32
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CloudWatch の利用イメージ 名前空間 33
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CloudWatch の利用イメージ ディメンション 標準メトリクス 統計、期間 ディメンション、メトリクス、統計、期間を選択して任意のグラフを表示 34
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. EC2のメトリクス収集 標準メトリクス(EC2) カスタムメトリクス 標準メトリクスでは 収集できないメトリクス • CPUUtilization • CPUCreditBalance • CPUCreditUsage • CPUSurplusCreditBalance • CPUSurplusCreditsCharged • DiskReadBytes ・DiskReadOps • DiskWriteBytes ・DiskWriteOps • NetworkOut ・NetworkPacketsOut • NetworkIn ・NetworkPacketsIn • StatusCheckFailed_Instance • StatusCheckFailed • StatusCheckFailed_System Amazon EC2 35
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ①EC2、ALB、RDSのメトリクス確認 #1 画面左上の サービス を選択し、CloudWatchと入力後、CloudWatchの管理画 面に移動してください。 36
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ①EC2、ALB、RDSのメトリクス確認 #2 左側のメニューのメトリクスをクリックすると、以下の画面が表示されます 37
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ①EC2、ALB、RDSのメトリクス確認 #3 EC2 → インスタンス別メトリクス をクリックしてください。 38
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ①EC2、ALB、RDSのメトリクス確認 #4 各種メトリクスが表示されております。検索ボックスにCPUを入力すると、CPU 関連のメトリクスに絞って表示できます。 39
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ①EC2、ALB、RDSのメトリクス確認 #5 チェックボックスを入れると、各種メトリクスをグラフで確認できます。 現在表示しているCPUUtilization(CPU使用率)です。 グラフにマウスオーバーすると、実際の値も表示できます。 40
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ①EC2、ALB、RDSのメトリクス確認 #6 日時が現地時刻とずれている可能性があるため、必要に応じてグラフの設定を変 えてください。 41
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ①EC2、ALB、RDSのメトリクス確認 #7 CPUUtilizationのチェックを外した後、ネットワークのメトリクスを確認するた め、NetworkIn、NetworkOutのメトリクスにチェックを入れてください。 42
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ①EC2、ALB、RDSのメトリクス確認 #8 NetworkIn、NetworkOutのチェックを外した後、(検索ボックスのnetworkの チェックも外す)パンくずリストの すべて を選択してください 43
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ①EC2、ALB、RDSのメトリクス確認 #9 ApplicationELBを選択します。その後、EC2同様表示される項目の中でも気にな るメトリクスにチェックを入れて、グラフがどのように表示されるか確認してみ てください。 44
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ①EC2、ALB、RDSのメトリクス確認 #10 続いて、RDSのメトリクスを確認していきます。RDSをクリック後、 データベース別メトリクスをクリックします。 45
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ①EC2、ALB、RDSのメトリクス確認 #11 WriteIOPS、ReadIOPSのチェックを入れます。 46
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ①EC2、ALB、RDSのメトリクス確認 #12 グラフ化したメトリクスのタブに切り替え、WriteIOPS、ReadIOPSの期間を5 分から1分に切り替えます (切り替え後のグラフは次スライド参照) 47
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ①EC2、ALB、RDSのメトリクス確認 #13 切り替えると以下の図のようなグラフに切り替わります。RDSはデフォルトで1 分間隔でメトリクスが取得されています。(EC2、ALBは5分間隔) 1分間隔の平均グラフの方が、 グラフがならされず、数値の 詳細が分かる 48
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 本セクションのまとめ • メトリクス監視が何故必要か • Amazon CloudWatch Metricsの概要 • EC2、ALB、RDSのメトリクス確認 49
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark.© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 作業が終わりましたら説明に移ります 講師の画面を見てください
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 本日のアジェンダ 1. 事前準備と関連サービス紹介 2. Amazon CloudWatchのハンズオン ①EC2、ALB、RDSのメトリクス確認 3. Amazon CloudWatchのハンズオン ②EC2のディスク使用率90%以上時の アラート発報 4. Amazon CloudWatchのハンズオン ③WordPressのアクセスログ、 エラーログ確認 5. Amazon CloudWatchのハンズオン ④WordPressのアクセスログの分析 6. 本コースのまとめ、リソース削除 51
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. アラートが何故必要か システムやシステムのコンポーネントの振る舞いに変化が起きた際にビジネスへ の影響を無くすため。 例: ディスク使用量が50%増加した際にアラートをあげる すぐに対応すべきアラートがあれば、SMSや電話を利用して通知し、人手で対応 することもある。理想としては、自動復旧できる仕組みがあると望ましい。 52
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CloudWatch Alarms CloudWatch メトリクスを監視するアラームと関連サービスのアクション CloudWatch Alarms CloudWatch Events CloudWatch Metrics CloudWatch Logs CloudWatch Logs Insights AWSサービス お客様システム CloudWatch Dashboardstime-baseevent-base メトリクスを送信 ログを送信 メトリクスに応じた アクションの実行 ログの可視化 イベントに応じた ターゲットによる処理 メトリクスを送信 53
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CloudWatch Alarms • CloudWatch Metricsをモニタリングしてアラームを発行可能 • 条件を指定して、自動アクションを実行が可能 • 例えば、CPU利用率が80%を超えた時にアラートメールを通知等 • アラームの状態はOK, ALARM, INSUFFICIENT_DATAの3種類 OK ALARM INSUFFICIENT_DATA 正常値 ✓ 定義された閾値を下 回っている 異常値 ✓ 定義された閾値を上 回っている 判定不能 ✓ データ不足のため状態 を判定できない ✓ CloudWatch特有 • データポイントとはCloudWatchに送信される値(CPU値など) • OK / アラーム時は入力されたデータポイントを基準に状態評価 • INSUFFIENT_DATA時はCloudWatchにテータポイントの入力が十分に無い状態 → “INSUFFICIENT_DATA”は必ずしも障害を表すステータスではない 54
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CloudWatchアラームの設定 CPU使用率80%以上が5分以上続いた場 合にアラートが発報される 55
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CloudWatch Alarmsのアクション機能 メトリクス CPUUtilization DiskReadBytes / DiskReadOps DiskWriteBytes / DiskWriteOps NetworkIn / NetworkOut StatusCheckFailed_Instance StatusCheckFailed_System Custom Metric Memory Free / Filesystem Free アクション Amazon EC2 Amazon CloudWatch Amazon EC2 Amazon Simple Notification Service Amazon EC2 Auto Scaling Alarm 56
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ユースケース:アクションの設定例 • SNS トピックを追加して、アラー ムの状態が変わったときにトピッ クを発行 • サブスクライブにEメールを選択 して、指定アドレスにメール通知 • サブスクライブにLambda 関数を 選択して、処理を実行 Amazon Simple Notification Service 例:GetMetricWidgetImage APIによるグラフ送付 1. CloudWatch MetricsにEC2からメトリクスを送付 2. 指定したしきい値を超えた時にSNS のアクション を実行 3. SNS をトリガーにAWS Lambdaを実行 4. GetMetricWidgetImage APIを利用して CloudWatch Metricsのグラフを取得する 5. 取得したグラフの画像ファイルを添付してEmailを 送信/運用システムに連携 EC2 SNSCloudWatch Alarm CloudWatch 57
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ②EC2のディスク使用率90%以上時のアラート発報 #1 左側のメニューから アラート をクリックします 58
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ②EC2のディスク使用率90%以上時のアラート発報 #2 アラームの作成 をクリック後、メトリクスの選択 をクリックします 59
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ②EC2のディスク使用率90%以上時のアラート発報 #3 CWAgent > ImageId.InstanceId.InstanceType.device.fstype… を選択します。 60
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ②EC2のディスク使用率90%以上時のアラート発報 #4 monitoring-1-Web インスタンスの disk_used_percent を選択し、 その後画面右下の メトリクスの選択 をクリックします 61 device: xvda1 fstype: xfs path: /
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ②EC2のディスク使用率90%以上時のアラート発報 #5 選択すると、以下のような画面が表示されます。 62
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ②EC2のディスク使用率90%以上時のアラート発報 #6 期間を 15分 間隔に変更します 63
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ②EC2のディスク使用率90%以上時のアラート発報 #7 条件を以下のとおりに変更し、(ディスク使用率 90%以下) 次へ のボタンをクリックします 64 本来であれば、90% 以上 と 設定しますが、アラートを 必ず発生させるために あえて設定しています
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ②EC2のディスク使用率90%以上時のアラート発報 #8 以下の画像のとおりの設定を行い、メールアドレスにはご自身が使っているアド レスを入力して、トピックの作成ボタンをクリックします トピックができあがると、 指定したメールアドレス 宛にメールが飛びます 65 トピック名は monitoring-1-topic で設定してください。 変更する場合は忘れないように メモを取っておいてください
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ②EC2のディスク使用率90%以上時のアラート発報 #9 メールのサンプル メール通知を受け取るために、Confirm subscription をクリックします 66 上記URLをクリックするとこのような 画面が表示されます
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ②EC2のディスク使用率90%以上時のアラート発報 #10 次へボタンをクリックします (興味のある人はAuto Scalingアクション、EC2アクションの追加ボタンを クリックして、どんな設定ができるか見てみましょう!) 67
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ②EC2のディスク使用率90%以上時のアラート発報 #11 monitoring-1-alarm を入力し、 次へ ボタンをクリックします 68
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ②EC2のディスク使用率90%以上時のアラート発報 #12 各設定値を確認し、 アラームの作成 ボタンをクリックします 69
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ②EC2のディスク使用率90%以上時のアラート発報 #13 アラーム作成直後は データ不足 と表示されますが、時間が経つと解消されます。 実際にアラートを発報させたい場合は、ディスク使用率が90%以上にすると メールが送信されます。 70
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 本セクションのまとめ • アラートが何故必要か • Amazon CloudWatch Alarmsの概要 • EC2のディスク使用率90%以上時のアラート発報の設定 71
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark.© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 作業が終わりましたら説明に移ります 講師の画面を見てください
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 本日のアジェンダ 1. 事前準備と関連サービス紹介 2. Amazon CloudWatchのハンズオン ①EC2、ALB、RDSのメトリクス確認 3. Amazon CloudWatchのハンズオン ②EC2のディスク使用率90%以上時の アラート発報 4. Amazon CloudWatchのハンズオン ③WordPressのアクセスログ、 エラーログ確認 5. 本コースのまとめ、リソース削除 73
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ログの集約が何故必要か よくある問題 • サーバーが増加した際に、各サーバーにログインしてログを確認する必要が あり、運用が辛い • 障害やディスク容量不足でサーバーにログインできず、ログを確認できない ログの集約することで、運用の手間をなくし、問題を分析しやすくなる CloudWatch Logs … … 74
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CloudWatch Logs とは • AWSサービスおよび顧客システムのログの監視、保存、アクセスを提供 • エージェント経由でログメッセージをCloudWatchエンドポイントに転送 • ログデータの保存期間を設定可能(1日~永久保存で選択可能) • Amazon S3へのログのエクスポートが可能 CloudWatch Logs サブスクリプション フィルタ メトリクスフィルタ AWS Lambda Amazon Kinesis Data Streams Amazon Kinesis Data Firehose AWSサービス お客様システム S3へのログの送信 75
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. CloudWatch Logsのディレクトリ階層 Web Server web001.ap-northeast-1 ロググループ ログストリーム ログイベント web002.ap-northeast-1 web003.ap-northeast-1 ログイベント • 1つのログエントリ • モニタリングしているリ ソースによって記録された アクティビティのレコード • イベント発生時のタイムス タンプおよび生のイベント メッセージで構成 ログストリーム • 複数のログイベントで構成 • モニタリングしているリソースの タイムスタンプ順でイベントを表 す ロググループ • 複数のログストリームで構成 • 保持、監視、アクセス制御につい て同じ設定を共有するログスト リームのグループを定義 76
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ログイベントのイメージ ログ内容はタイムスタンプとログメッセージ(UTF-8)で構成 77
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ③WordPressのアクセスログ、エラーログ確認 #1 左側のメニューから、 ロググループ をクリックします 78
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ③WordPressのアクセスログ、エラーログ確認 #2 今回構築したEC2インスタンス上に存在するWordPressのログを確認していきま す。まず、wordpress_access_log をクリックします ログの有効期限も設定できます 79
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ③WordPressのアクセスログ、エラーログ確認 #3 一番上のログストリームを選択してください。 80
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ③WordPressのアクセスログ、エラーログ確認 #4 すると、以下のようなWordPressのアクセスログが表示されます。 81
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ③WordPressのアクセスログ、エラーログ確認 #5 GETメソッドに関連するアクセスログを表示する場合は、検索バーに GET の ような文字列を入力して検索できます。 検索期間の絞り込みも可能です 82
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ③WordPressのアクセスログ、エラーログ確認 #6 表示されている時刻がずれていることもあるため、必要に応じてタイムゾーンを 変更してください 83
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ③WordPressのアクセスログ、エラーログ確認 #7 アクセスログを確認できたため、次はエラーログを確認します。パンくずリスト から、 Log groups をクリックします 84
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ③WordPressのアクセスログ、エラーログ確認 #8 wordpress_error_log をクリックし、任意のログストリームを選択します。 ログの有効期限も設定できます 85
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. ③WordPressのアクセスログ、エラーログ確認 #9 アクセスログ同様、以下のような画面が表示されます。 86
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. (補足情報)CloudWatch Agent の設定ファイル アクセスログ、エラーログは以下のようなCloudWatch Agentの設定を 入れることで実現可能です。ダウンロードした資材の中の amazon-cloud-watch-agent.json が該当しているファイルです。 アクセスログの設定 エラーログの設定 https://docs.aws.amazon.com/ja_jp/AmazonCloudWatch/latest/monitoring/create-cloudwatch-agent-configuration-file-wizard.html 87
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark.© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 作業が終わりましたら説明に移ります 講師の画面を見てください
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 本セクションのまとめ • ログの集約が何故必要か • Amazon CloudWatch Logsの概要 • WordPressのアクセスログ、エラーログ確認 89
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. (オプション)ハンズオンを完走した方向け情報 以下のURLから、動画を見ながら是非続きをやってみてください! https://pages.awscloud.com/JAPAN-event-OE-Hands-on-for-Beginners-monitoring-2020-reg-event-LP.html 90
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 本日のアジェンダ 1. 事前準備と関連サービス紹介 2. Amazon CloudWatchのハンズオン ①EC2、ALB、RDSのメトリクス確認 3. Amazon CloudWatchのハンズオン ②EC2のディスク使用率90%以上時の アラート発報 4. Amazon CloudWatchのハンズオン ③WordPressのアクセスログ、 エラーログ確認 5. 本コースのまとめ、リソース削除 91
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 各リソースの削除 (1/2) CloudFormationの画面からmonitoring-1を削除してください。 今回作られたCloudWatch関連リソースに関しても必要に応じて削除をお願いします。 ※CloudWatchメトリクスに関しては削除できない仕様ですが、EC2、RDSといった各リソースが削除されればメト リクスが出力されなくなります。 92
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 各リソースの削除 (2/2) 削除するリソース一覧 サービス リソース CloudFormation スタック (monitoring-1) CloudWatch アラーム (monitoring-1-alarm) ロググループ (wordpress_access_log, wordpress_error_log) 93
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark.© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 作業が終わりましたら説明に移ります 講師の画面を見てください
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 参考資料 AWS Black Belt Online Seminar - Amazon CloudWatch https://www.slideshare.net/AmazonWebServicesJapan/20190326-aws-black-belt-online- seminar-amazon-cloudwatch Amazon CloudWatch ドキュメント https://docs.aws.amazon.com/cloudwatch/index.html CloudWatch Logs - ウィザードを使用して CloudWatch エージェント設定ファイルを作成する https://docs.aws.amazon.com/ja_jp/AmazonCloudWatch/latest/monitoring/create-cloudwatch-agent-configuration- file-wizard.html 95
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. 本ハンズオンの狙い • 110 分でAWSにおけるサーバーの監視 方法をクイックに学んでいただく • 説明 よりも 体験 を重視 • Next Action に繋げていただきたい ラーニングピラミッド 👉 講義 読書 視聴覚 デモ グループ討論 自ら体験する 他の人に教える 96
© 2020, Amazon
Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark. Thank you!
Publicidad