Publicidad

Azure Monitor Logで実現するモダンな管理手法

Senior Cloud Solution Architect ( Analytics & AI Innovation )
24 de Jul de 2019
Publicidad

Más contenido relacionado

Presentaciones para ti(20)

Similar a Azure Monitor Logで実現するモダンな管理手法(20)

Publicidad

Más de Takeshi Fukuhara(20)

Último(20)

Publicidad

Azure Monitor Logで実現するモダンな管理手法

  1. Azure 2019年7月19日 ( 16:40 - 17:20 ) インフラエンジニアが次に進むために ~ Azure インフラ管理超実践セミナー 福原 毅 ( tfukuha ) クラウド ソリューション アーキテクト パートナー事業本部 日本マイクロソフト株式会社 Azure Monitor / Azure Monitor Logs で実現するモダンな管理手法
  2. Azure Monitor 概要 Azure Monitor Logs のデータソース • Azure Tenant • Azure Subscription • Azure Resources • Operating System ( Guest ) • Application • Custom Sources • その他データソース ( Azure Security Center ) まとめ Appendix: • Analyze: Azure Monitor Logs (旧 Log Analytics ) • 今後の理解促進のために • Azure のウェビナー • Azure サイトの歩き方 • Azure アーキテクチャ センター • Microsoft Learn 本日の内容
  3. ライフサイクルをカバーするセキュリティと運用管理機能 Azureの標準機能で、適切で、コスト効率の高い状態を維持 保護 セキュリティ 監視 構成管理 ガバナンス セキュリティ管理 脅威からの保護 Microsoft Azure Portal | Azure Resource Manager | Azure Active Directory | 移行 アプリケーション、インフラストラクチャ、ネットワーク監視、ログ分析と診断
  4. Azure Monitor のブランドの変更(2018年9月17日投稿) https://docs.microsoft.com/ja-jp/azure/azure-monitor/azure-monitor-rebrand 今後も継続されます。 エージェントやソリューションなど、Log Analytics の一部と見なされていた他の機能は、Azure Monitor の機能に変更されます。 機能は、Azure portal のエクスペリエンス に加えられる機能の改善以外に変更点はありません。 Operations Management Suite ブランドの廃止 Operations Management Suite (OMS) は、ライセンス目的で以 下の Azure 管理サービスをバンドルしたものです。 • Application Insights • Azure Automation • Azure Backup • Log Analytics • Site Recovery これらのサービスに新しい価格設定が導入されました。新規のお客 様は OMS バンドルを入手できなくなりました。 前述の Azure Monitor への統合を除いて、OMS の一部だったサービスは変更さ れていません。 監視サービスを Azure Monitor への統合 Log Analytics と Application Insights は、Azure リソースとハイブ リッド環境を監視する単一の統合エクスペリエンスを提供するために Azure Monitor に統合されました。 これらのサービスから削除された 機能はありません。機能を失ったり妥協したりすることなく、これまで と同じシナリオを実行できます。 これらの各サービスのドキュメントは、Azure Monitor の単一のコンテ ンツ セットに統合されています。 そのため、特定の監視シナリオに関 するすべてのコンテンツを 1 つの場所で見つけることができます。複数 のコンテンツ セットを参照する必要はありません。 統合サービスの進 化に伴って、今後もコンテンツの統合を進める予定です。 Log Analytics の再定義 Log Analytics は、Azure の管理において中心的役割を果たします。 たとえば、さまざまなソースからテレメトリなどのデータを収集します。ま た、アプリケーションやリソースの運用に欠かせない分析情報を得る 手段としてクエリ言語や分析エンジンを備えていることも、そうした役 割の 1 つです。 この重要な役割は、Azure Monitor の機能として
  5. “Log Analytics” から、”Azure Monitor Logs”へ •“Log Analytics”という用語は、”Azure Monitor Logs”へ変更 •“Azure Monitor Logs”のデータの保存場所の名称は、引き続き “Log Analytics ワークスペース” •“管理ソリューション” から、”監視ソリューション”へ変更 Log Analytics の用語変更 – 2019年2月 https://docs.microsoft.com/ja-jp/azure/azure-monitor/terminology
  6. Azure Monitor: アプリケーションとインフラストラクチャを監視 フル スタックの可視性、問題の検出と修正、パフォーマンスの 最適化、顧客の動作の理解を全部1つの場所で実現
  7. Azure Monitor 概要 Azure Monitorで、仮想マシンと AKSのインフラレベルの問題を関連付 スマート アラートと自動化された アクションで、大規模に運用 Application Insightsで、アプリケー ションと関連する問題の検出と診断 Azure Monitor Logsで、トラブル シュートと詳細な診断のドリル ダウン Azureダッシュボードとワークブックで、 視覚化
  8. Azure Monitor Logs ( 旧名称: Log Analytics ) • ログ収集&分析基盤 as a Service • ハイブリッド環境を一元管理 • シンプルなクエリ言語と高速な検索基盤 • 改ざん不可、ロールベースアクセス制御も可能 ログ
  9. Azure Monitor 概要 Azure Monitor Logs のデータソース • Azure Tenant • Azure Subscription • Azure Resources • Operating System ( Guest ) • Application • Custom Sources • その他データソース ( Azure Security Center ) まとめ Appendix: • Analyze: Azure Monitor Logs (旧 Log Analytics ) • 今後の理解促進のために • Azure のウェビナー • Azure サイトの歩き方 • Azure アーキテクチャ センター • Microsoft Learn 本日の内容
  10. Azure Monitor 統合監視 Metrics Logs Application Containers VM Monitoring Solutions Insights Dashboards Views Power BI Workbooks Visualize Metrics Explorer Azure Monitor Logs Analyze Alerts Autoscale Respond Event Hubs Ingest & Export APIs Logic Apps Integrate Azure Monitor Custom Sources Application Operating System Azure Resources Azure Subscription Azure Tenant
  11. • Azure テナントに関連するテレメトリは、Azure Active Directory などのテナント全体のサービスから収集 • Azure AD Report: サインイン アクティビティの履歴と、特定のテナント内で行われた変更の監査証跡 Azure Tenant https://docs.microsoft.com/ja-jp/azure/azure-monitor/platform/data-sources#azure-tenant Azure Azure 他社クラウド オンプレミス (旧Log Analytics) Log Analytics Workspace
  12. Azure AD ログをAzure Monitor Logs にストリーミング
  13. de:code 2019 SE01 Azure Active Directory のログの"みかた“ - 長期保存・外部 SIEM 連携・分析手法 - 日本マイクロソフト株式会社 セキュリティ技術営業部 テクノロジー ソリューション プロフェッショナル CISSP 松井 大 https://www.microsoft.com/ja-jp/events/decode/2019session/detail.aspx?sid=SE01
  14. Azure Subscription • Service Health:アプリとリソースが依存するサブスクリプション内の Azure サービスの正常性の情報を提供 • Activity Log:サービスの正常性レコードと Azure リソースに対して行われた構成の変更に関するレコード https://docs.microsoft.com/ja-jp/azure/azure-monitor/platform/data-sources#azure-subscription Azure Azure 他社クラウド オンプレミス (旧Log Analytics) Log Analytics Workspace
  15. Azure Resources • Platform Metrics: Azure リソースのパフォーマンスと操作を反映 (数値的に計測された値) • Diagnostic Logs: Azure リソースで実行される操作に関する情報を提供 (各リソースが出力するログ) https://docs.microsoft.com/ja-jp/azure/azure-monitor/platform/data-sources#azure-resources Azure Azure 他社クラウド オンプレミス (旧Log Analytics) Log Analytics Workspace
  16. Activity Logs • =リソースに対して外部から実行された書き込み操作 で、いつ誰が行ったかを記録するもの • Azureの基盤側のログ Diagnostic Logs (診断ログ) • =各リソースが出力するログ Metrics • =各リソースが出力する数値的に計測された値 Azureが出力するログとメトリック https://docs.microsoft.com/ja-jp/azure/security/azure-log-audit
  17. Activity Logs のカテゴリ https://docs.microsoft.com/ja-jp/azure/azure-monitor/platform/activity-logs-overview カテゴリ 概要 管理 Resource Manager で実行されるすべての作成、更新、削除、およびアクション操作のレコード。具体例は、 "仮想マシンの作成"、"ネットワーク セキュリティ グループの削除" など サービス 正常性 Azure で発生した任意のサービス正常性インシデントのレコード。具体例は、"SQL Azure in East US is experiencing downtime" (米国東部の SQL Azure でダウンタイムが発生しています) など リソース 正常性 Azure リソースで発生したすべてのリソース正常性イベントのレコード。具体例は、[Virtual Machine health status changed to unavailable](仮想マシンの正常性状態が使用不可に変わりました) など アラート Azure アラートの全アクティビティのレコード。具体例は、"CPU % on myVM has been over 80 for the past 5 minutes" (過去 5 分間の myVM の CPU % が 80 を超えました) など 自動スケール サブスクリプションで定義したすべての自動スケール設定に基づいて、自動スケール エンジンの操作に関連する すべてのイベントのレコード。具体的例は、"Autoscale scale up action failed" (自動スケールのスケールアッ プ アクションに失敗しました) など 推奨 Azure Advisor からの推奨イベント セキュリティ Azure Security Center によって生成されたアラートのレコード。具体例は、"Suspicious double extension file executed" (拡張子が 2 つある不審なファイルが実行されました) など ポリシー Azure Policy によって実行されるすべての効果アクション操作のレコード。具体的例は、監査と拒否など
  18. Azure Monitor Logs と Metrics Explorer 仮想マシンのCPU、ディスクはじめ、 各Azureサービスの出すメトリック情 報を集約、可視化 仮想マシンのCPU、ディスクはじめ、 各Azureサービスの出すメトリック情報 を集約、可視化
  19. ネットワーク サービスの Metrics と Diagnostic Logs Express Route BitsInPerSecond, BitsOutPerSecond PeeringRouteLog Azure VPN Gateway Gateway S2S Bandwidth Gateway P2S Bandwidth P2S Connection Count Tunnel Bandwidth Tunnel Egress Bytes Tunnel Ingress Bytes Tunnel Egress Packets Tunnel Ingress Packets Tunnel Egress TS Mismatch Packet Drop Tunnel Ingress TS Mismatch Packet Drop GatewayDiagnosticLog TunnelDiagnosticLog RouteDiagnosticLog IKEDiagnosticLog P2SDiagnosticLog Application Gateway Throughput Unhealthy Host Count Healthy Host Count Total Requests Failed Requests Response Status Current Connections ApplicationGatewayAccessLog ApplicationGatewayPerformanceLog ApplicationGatewayFirewallLog Load Balancer Data Path Availability Health Probe Status Byte Count Packet Count SYN Count SNAT Connection Count Allocated SNAT Ports (Preview) Used SNAT Ports (Preview) LoadBalancerAlertEvent LoadBalancerProbeHealthStatus Traffic Manager Queries by Endpoint Returned Endpoint Status by Endpoint ProbeHealthStatusEvents Azure DNS Query Volume Record Set Count Record Set Capacity Utilization DDoS Inbound packets DDoS Inbound packets dropped DDoS Inbound packets forwarded DDoS Inbound TCP packets DDoS Inbound TCP packets dropped DDoS Inbound TCP packets forwarded DDoS Inbound UDP packets DDoS Inbound UDP packets dropped DDoS Inbound UDP packets forwarded DDoS Inbound bytes DDoS Inbound bytes dropped DDoS Inbound bytes forwarded DDoS Inbound TCP bytes DDoS Inbound TCP bytes dropped DDoS Inbound TCP bytes forwarded DDoS Inbound UDP bytes DDoS Inbound UDP bytes dropped DDoS Inbound UDP bytes forwarded DDoS Under DDoS attack or not Inbound TCP packets to trigger DDoS mitigation Inbound UDP packets to trigger DDoS mitigation Inbound SYN packets to trigger DDoS mitigation Data Path Availability Byte Count Packet Count SYN Count DDoSProtectionNotifications Azure Firewall AzureFirewallApplicationRule AzureFirewallNetworkRule NSG NetworkSecurityGroupEvent NetworkSecurityGroupRuleCounter
  20. Azureが出力する情報の保存先まとめ Activity Logs、Diagnostic Logs、Metricsでそれぞれ異なる
  21. ログの出力先により、利用シナリオが異なる Azure Monitor における監視データの場所: https://docs.microsoft.com/ja-jp/azure/azure-monitor/platform/data-locations (旧Log Analytics) Log Analytics Workspace • ウォーム パス: ログ分析や視覚化、 アラートに活用 • コールド パス: アーカイブ • ホット パス: リアルタイム処理や、 他システムへのストリーム ログの出力先は、排他で はなく、利用シナリオに合 わせて併用
  22. Operating System ( Guest ) https://docs.microsoft.com/ja-jp/azure/azure-monitor/platform/data-sources#operating-system-guest Azure Azure 他社クラウド オンプレミス (旧Log Analytics) Log Analytics Workspace
  23. Diagnostic Extension (Azure診断の拡張機能): Azure コンピュー ティング リソースのクライアント オペレーティング システムからログとパフォー マンス データを収集 Log Analytics Agent: Windows または Linux の仮想マシンまたは物 理コンピューターを包括的に監視および管理 Dependency Agent (依存関係エージェント): Log Analytics エージェ ントと統合され、仮想マシンで実行されているプロセスおよび外部プロセ スの依存関係に関する検出データを収集。Service MapとAzure Monitor for VMsには、Dependency Agentが必要 Operating System ( Guest )
  24. Azureの仮想マシンであれば、Portalから設定 https://docs.microsoft.com/ja-jp/azure/log-analytics/log-analytics-quick-collect-azurevm オンプレミス、他クラウドのサーバーであれば、エージェントをインストール Windows https://docs.microsoft.com/ja-jp/azure/log-analytics/log-analytics-agent-windows Linux https://docs.microsoft.com/ja-jp/azure/log-analytics/log-analytics-quick-collect-linux-computer 仮想マシン (Azure VM、オンプレ/他社クラウド含む) Log Analytics ワークスペースから詳細設定 >> Connected Source >> Windows ServerかLinux ServersLog Analytics ワークスペースから仮想マシン >>特定の仮想マシンを選択 >> 接続
  25. Instrument Package: Application Insightsがアプリケーションのパフォーマンスおよび操作に 関連するメトリックとログを収集し、Azure Monitor Logへ格納 Availability Tests: インターネット上の様々な場所からアプリの可用性をテスト Application Code https://docs.microsoft.com/ja-jp/azure/azure-monitor/platform/data-sources#application-code Azure Azure 他社クラウド オンプレミス (旧Log Analytics)
  26. Log Analytics ワークスペースのデータ: サブスクリプションに複数のワークスペースを作成し、ログ データの様々なセットを管理。各ワークスペースには、それぞれに特定のソースからのデータが格納さ れる複数のテーブルが含まれる Application Insights からのログデータ: 監視対象のアプリケーションごとに個別に格納される。 各アプリケーションには、アプリケーションの要求、例外、ページビューなどのデータを保持するテーブ ルセットがある リソース間のクエリ: リソース間の クエリを使用して、他のログ データ と共にアプリケーション データを分析 したり、複数のワークスペースまたは アプリケーションを含むクエリの作成 が可能 Azure Monitor Logs のデータ構造 https://docs.microsoft.com/ja-jp/azure/azure-monitor/platform/data-platform-logs#how-is-data-in-azure-monitor-logs-structured
  27. How can we improve Application Insights ? Variable data retention (longer or shorter than the 90-day default) https://feedback.azure.com/forums/357324-application-insights/suggestions/17454031
  28. • .NET, JS, Java, Node.js、もしくは、 そのほかのOSSでのアプリを各言語 のSDKで監視 • App Mapによるサーバー・クライアン トの関連性や依存関係を視覚化 • 分散されたE2Eトランズアクションの トラック(Python & Go含む) NEW! • Snapshot Debugging & Profiling機能でコードレベルまでドリ ルダウン • エンドユーザーの行動や慣習を理解 アプリケーションの End-to-Endの診断
  29. de:code 2019 DT05 祝 東日本リージョン一般提供! Azure Application Insights 基礎と実践 フリーランス Microsoft MVP for Microsoft Azure 芝村 達郎 https://www.microsoft.com/ja-jp/events/decode/2019session/detail.aspx?sid=DT05
  30. Application Insights の有効化 Azure App Service での設定画面 Application Insights を有効にするだけでは自動で集計されない。 アプリケーション側で SDK を使ってメトリクスを送る必要がある。
  31. npm install applicationinsights => package.json js 処理の最初に Application Insights – Node.js の場合 "dependencies": { "applicationinsights": "^1.0.0" } const appInsights = require('applicationinsights'); appInsights.setup(); appInsights.start(); https://docs.microsoft.com/ja-jp/azure/application-insights/app-insights-platforms
  32. Application Insights - メトリックスエクスプローラー
  33. Custom Code • RESTクライアントから、Custom Metrics APIを介してAzure Monitor Metricsへデータを保存 • RESTクライアントから、Custom Data Collector APIを介してLog Analytics ワークスペースへデータを保存 https://docs.microsoft.com/ja-jp/azure/azure-monitor/platform/data-sources#custom-sources Azure Azure 他社クラウド オンプレミス (旧Log Analytics) Log Analytics Workspace
  34. Azure Security Center 収集したセキュリティ データを Log Analytics ワークスペースへ保存し、 Azure Monitor によって収集された他のデータと共に分析できるようにす る。 Azure Sentinel 様々なデータソースから収集したデータを Log Analytics ワークスペースへ 保存し、Azure Monitor によって収集された他のログデータと共に分析 できるようにする。 その他のデータソース
  35. オンプレミス物理・仮想サーバー、Azure 上の仮想マシン、Azure のサービスのセキュ リティログを Log Analytics ワークスペースに送信 → セキュリティログをMicrosoftの解析エンジンで分析 Azure Security Centerのしくみ Log Analytics ワークスペース
  36. Azure Security Center Azureとオンプレミス両方のセキュリティ状況を一覧
  37. 不正アクセスやOS上での不正なふるまいを、ログやクラッシュダンプ解析の結果と AIおよびMicrosoftの知見を組み合わせて検知 Azure Security Center ダンプファイル解析から不正 ファイルを検知 通常と比べて異常に多い RDP接続 通常と異なる場所からのログ イン
  38. まとめ Azure の監視には、Azure Monitor を! https://azure.microsoft.com/ja-jp/pricing/details/monitor/ https://aka.ms/MonitoringDocs
  39. Azure Monitor 概要 Azure Monitor Logs のデータソース • Azure Tenant • Azure Subscription • Azure Resources • Operating System ( Guest ) • Application • Custom Sources • その他データソース ( Azure Security Center ) まとめ Appendix: • Analyze: Azure Monitor Logs (旧 Log Analytics ) • 今後の理解促進のために • Azure のウェビナー • Azure サイトの歩き方 • Azure アーキテクチャ センター • Microsoft Learn 本日の内容
  40. Azure Monitor 統合監視 Metrics Logs Application Containers VM Monitoring Solutions Insights Dashboards Views Power BI Workbooks Visualize Metrics Explorer Azure Monitor Logs Analyze Alerts Autoscale Respond Event Hubs Ingest & Export APIs Logic Apps Integrate Azure Monitor Custom Sources Application Operating System Azure Resources Azure Subscription Azure Tenant
  41. Azure Portal内でAzure Monitor Logs の詳細なクエリー が可能 監視、管理, セキュリティーの解析 プラットフォーム クエリーを用いて、調査, 統計& 原因 / トレンドの分析 ML アルゴリズムを駆使したクラス タリングや異常検出 Azure Monitor Logs による詳細なクエリー
  42. Azure Monitor Logs のクエリ言語は、Kusto Query Languageと呼ばれ、Azure Data Explorer, Azure Resource Graph, Application Insights などでも利用されているため、一 度覚えると Azure のいろいろなサービスでも活用可能 Demo環境 • すでにログデータが貯められており、だれでもクエリを 試せる環境 - https://aka.ms/LADemo 公式リファレンス • 言語リファレンス ( 英語のみ、文法解説・サンプル豊富 ) https://docs.loganalytics.io/index 無料の学習コース • Pluralsight "Kusto Query Language (KQL) from Scratch" • Kusto Query Languageの無料Pluralsight学習コース (英語のみだが、基本から高度な使い方まで網羅、Pluralsightへの登録が必要(無料))https://aka.ms/KQLPluralsight (ご参考までに) Azure Monitor Logs の クエリ
  43. Azure Monitor 概要 Azure Monitor Logs のデータソース • Azure Tenant • Azure Subscription • Azure Resources • Operating System ( Guest ) • Application • Custom Sources • その他データソース ( Azure Security Center ) まとめ Appendix: • Analyze: Azure Monitor Logs (旧 Log Analytics ) • 今後の理解促進のために • Azure のウェビナー • Azure サイトの歩き方 • Azure アーキテクチャ センター • Microsoft Learn 本日の内容
  44. おすすめのウェビナー シリーズ • Azure へのお引越しシリーズ (全6回) • Azure はじめの一歩 (全6回) • 一歩先行く Azure Computing シリーズ (全3回) • Windows Server 2019 徹底紹介シリーズ (全4回) https://azure.microsoft.com/ja-jp/overview/webinars/ 200以上のオンデマンド ウェビナーと、随時ライブ ウェビナーを、提供中
  45. https://www.microsoft.com/ja-jp/cloud-platform/azure-site-usage
  46. https://aka.ms/mspnp
  47. 47 https://docs.microsoft.com/ja-jp/learn/browse/?resource_type=learning%20path&roles=data-engineer
  48. © 2019 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Publicidad