用于容器的 Azure Monitor 概述Azure Monitor for containers overview

用于容器的 Azure Monitor 功能旨在监视部署到 Azure 容器实例或 Azure Kubernetes 服务 (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 Monitor 通过 Metrics 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 Monitor 的体系结构

用于容器的 Azure Monitor 提供了什么?What does Azure Monitor for containers provide?

用于容器的 Azure Monitor 使用 Azure Monitor 的不同功能提供全面的监视体验,使你能够了解 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 Monitor 可以: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 容器实例中托管的容器组及其容器的处理器和内存利用率。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.

Note

目前,对 Prometheus 的支持是公共预览版中的一项功能。Support for Prometheus is a feature in public preview at this time.

如何访问此功能?How do I access this feature?

可以通过两种方式访问用于容器的 Azure Monitor:从 Azure Monitor 访问或直接从所选 AKS 群集访问。You can access Azure Monitor for containers two ways, from Azure Monitor or directly from the selected AKS cluster. 在 Azure Monitor 中可以从全局角度查看已部署的所有容器(受到监视的容器和未受监视的容器),从而可以跨订阅和资源组进行搜索和筛选,然后从所选容器钻取到用于容器的 Azure Monitor。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 Monitor 的方法概述

如果想要监视和管理 Docker 和 Windows 容器主机以查看配置、审核和资源利用率,请参阅容器监视解决方案If you are interested in monitoring and managing your Docker and Windows container hosts to view configuration, audit, and resource utilization, see the Container Monitoring solution.

后续步骤Next steps

若要开始监视 AKS 群集,请查看如何为容器启用 Azure Monitor 以了解启用监视的要求和可用方法。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.