適用於容器的 Azure 監視器概觀Azure Monitor for containers overview

適用於容器的 Azure 監視器是一項功能,其設計訴求是要監視部署至 Azure Container Instances 或 Azure Kubernetes Service (AKS) 上所裝載受控 Kubernetes 叢集的容器工作負載效能。Azure Monitor for containers is a feature designed to monitor the performance of container workloads deployed to either Azure Container Instances or managed Kubernetes clusters hosted on Azure Kubernetes Service (AKS). 監視容器很重要,尤其在您使用多個應用程式大規模執行生產環境叢集時。Monitoring your containers is critical, especially when you're running a production cluster, at scale, with multiple applications.

適用於容器的 Azure 監視器可藉由透過計量 API 從 Kubernetes 中取得的控制器、節點與容器來收集記憶體與處理器計量,為您提供效能可見度。Azure Monitor for containers gives you performance visibility by collecting memory and processor metrics from controllers, nodes, and containers that are available in Kubernetes through the Metrics API. 容器記錄也會一併收集。Container logs are also collected. 當您從 Kubernetes 叢集啟用監視之後, 系統會透過適用于 Linux 的 Log Analytics 代理程式容器化版本自動收集計量和記錄。After you enable monitoring from Kubernetes clusters, metrics and logs are automatically collected for you through a containerized version of the Log Analytics agent for Linux. 計量會寫入計量存放區, 並將記錄資料寫入與您的Log Analytics工作區相關聯的記錄存放區。Metrics are written to the metrics store and log data is written to the logs store associated with your Log Analytics workspace.

容器的 Azure 監視器架構

適用於容器的 Azure 監視器提供哪些功能?What does Azure Monitor for containers provide?

適用于容器的 Azure 監視器可使用 Azure 監視器的不同功能提供完整的監視體驗, 讓您瞭解 Kubernetes 叢集和容器工作負載的效能和健康情況。Azure Monitor for containers delivers a comprehensive monitoring experience using different features of Azure Monitor enabling you to understand the performance and health of your Kubernetes cluster and the container workloads. 使用適用于容器的 Azure 監視器, 您可以:With Azure Monitor for containers you can:

  • 識別正在節點上執行的 AKS 容器,以及其平均的處理器與記憶體使用率。Identify AKS containers that are running on the node and their average processor and memory utilization. 此知識可協助您識別資源瓶頸。This knowledge can help you identify resource bottlenecks.

  • 識別容器群組及其裝載於 Azure Container Instances 之容器的處理器和記憶體使用率。Identify processor and memory utilization of container groups and their containers hosted in Azure Container Instances.

  • 識別容器在控制器或 Pod 中的所在位置。Identify where the container resides in a controller or a pod. 此知識可協助您檢視控制器或 Pod 的整體效能。This knowledge can help you view the controller's or pod's overall performance.

  • 檢閱在和支援 Pod 的標準程序無關之主機上執行的工作負載的資源使用率。Review the resource utilization of workloads running on the host that are unrelated to the standard processes that support the pod.

  • 了解叢集在平均負載和最高負載之下的行為。Understand the behavior of the cluster under average and heaviest loads. 此知識可協助您識別所需的容量,並判斷叢集可承受的負載上限。This knowledge can help you identify capacity needs and determine the maximum load that the cluster can sustain.

  • 設定警示, 以主動通知您, 或在節點或容器上的 CPU 和記憶體使用率超過閾值時加以記錄。Configure alerts to proactively notify you or record it when CPU and memory utilization on nodes or containers exceed your thresholds.

  • Prometheus整合, 以查看它從節點和 Kubernetes 收集的應用程式和工作負載計量使用查詢來建立自訂警示、儀表板, 以及詳細的執行詳細分析。Integrate with Prometheus to view application and workload metrics it collects from nodes and Kubernetes using queries to create custom alerts, dashboards, and detailed perform detailed analysis.

    注意

    目前的 Prometheus 支援是公開預覽中的一項功能。Support for Prometheus is a feature in public preview at this time.

  • 監視部署至 AKS 引擎的容器工作負載。Monitor container workloads deployed to AKS-engine.

查看下列提供中繼層級深入探討的影片, 以協助您瞭解如何使用容器的 Azure 監視器監視 AKS 叢集。Check out the following video providing an intermediate level deep dive to help you learn about monitoring your AKS cluster with Azure Monitor for containers.

如何存取此功能?How do I access this feature?

您有兩種方式可用來存取適用於容器的 Azure 監視器:從 Azure 監視器或直接從所選取的 AKS 叢集。You can access Azure Monitor for containers two ways, from Azure Monitor or directly from the selected AKS cluster. 從 Azure 監視器中, 您會看到所有已部署的容器的全域觀點, 這些都是受監視的, 而不是, 可讓您在訂用帳戶和資源群組之間進行搜尋和篩選, 然後向下切入至容器的 Azure 監視器選取的容器。From Azure Monitor, you have a global perspective of all the containers deployed, which are monitored and which are not, allowing you to search and filter across your subscriptions and resource groups, and then drill into Azure Monitor for containers from the selected container. 否則, 您可以直接從 [AKS] 頁面中選取的 AKS 容器存取該功能。Otherwise, you can access the feature directly from a selected AKS container from the AKS page.

存取適用於容器的 Azure 監視器方法概觀

如果您想要監視和管理在 AKS 外部執行的 Docker 和 Windows 容器主機, 以查看設定、audit 和資源使用率, 請參閱容器監視解決方案If you are interested in monitoring and managing your Docker and Windows container hosts running outside of AKS to view configuration, audit, and resource utilization, see the Container Monitoring solution.

後續步驟Next steps

若要開始監視您的 AKS 叢集, 請參閱如何啟用容器的 Azure 監視器, 以瞭解啟用監視的需求和可用方法。To begin monitoring your AKS cluster, review How to enable the Azure Monitor for containers to understand the requirements and available methods to enable monitoring.