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

適用于容器的 Azure 監視器是一項功能,其設計目的是要監視部署至的容器工作負載的效能:Azure Monitor for containers is a feature designed to monitor the performance of container workloads deployed to:

適用于容器的 Azure 監視器支援執行 Linux 和 Windows Server 2019 作業系統的叢集。Azure Monitor for containers supports clusters running the Linux and Windows Server 2019 operating system. 它支援的容器執行時間包括 Docker、Moby,以及任何 CRI 相容的執行時間,例如 CRI-O 和 ContainerD。The container runtimes it supports are Docker, Moby, and any CRI compatible runtime such as CRI-O and ContainerD.

監視容器很重要,尤其在您使用多個應用程式大規模執行生產環境叢集時。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 監視器的不同功能提供完整的監視體驗。Azure Monitor for containers delivers a comprehensive monitoring experience using different features of Azure Monitor. 這些功能可讓您瞭解執行 Linux 和 Windows Server 2019 作業系統的 Kubernetes 叢集以及容器工作負載的效能和健康情況。These features enable you to understand the performance and health of your Kubernetes cluster running Linux and Windows Server 2019 operating system, 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, or when a health state change occurs in the cluster at the infrastructure or nodes health rollup.

  • 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.

  • 監視部署到 Azure Stack 上的 AKS engine 內部部署和 AKS engine的容器工作負載。Monitor container workloads deployed to AKS Engine on-premises and AKS Engine on Azure Stack.

  • 監視 部署至 Azure Red Hat OpenShift的容器工作負載。Monitor container workloads deployed to Azure Red Hat OpenShift.

    注意

    Azure Red Hat OpenShift 的支援目前為公開預覽功能。Support for Azure Red Hat OpenShift is a feature in public preview at this time.

  • 監視 部署到 Azure Arc 啟用 Kubernetes (preview) 的容器工作負載。Monitor container workloads deployed to Azure Arc enabled Kubernetes (preview).

相較于 Linux 叢集,監視 Windows Server 叢集的主要差異如下:The main differences in monitoring a Windows Server cluster compared to a Linux cluster are the following:

  • Windows 沒有記憶體 RSS 計量,因此不適用於 Windows 節點和容器。Windows doesn't have a Memory RSS metric, and as a result it isn't available for Windows node and containers. 您可以使用 工作集 度量。The Working Set metric is available.
  • Windows 節點無法使用磁片儲存體容量資訊。Disk storage capacity information isn't available for Windows nodes.
  • 只有 pod 環境會受到監視,而不是 Docker 環境。Only pod environments are monitored, not Docker environments.
  • 在預覽版本中,最多可支援30個 Windows Server 容器。With the preview release, a maximum of 30 Windows Server containers are supported. 這項限制不適用於 Linux 容器。This limitation doesn't apply to Linux containers.

請參閱下列影片,以瞭解如何使用適用于容器的 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 容器主機,以查看設定、審核和資源使用率,請參閱 容器監視解決方案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

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