Azure Monitor 代理概述Overview of Azure Monitor agents

虚拟机和其他计算资源需要代理收集监视数据,以度量其来宾操作系统和工作负载的性能和可用性。Virtual machines and other compute resources require an agent to collect monitoring data to measure the performance and availability of their guest operating system and workloads. 本文介绍 Azure Monitor 使用的代理,并帮助你确定需要满足特定环境的哪些要求。This article describes the agents used by Azure Monitor and helps you determine which you need to meet the requirements for your particular environment.

备注

由于 Azure Monitor 和 Log Analytics 最近已合并到一起,Azure Monitor 目前有多个代理。Azure Monitor currently has multiple agents because of recent consolidation of Azure Monitor and Log Analytics. 虽然它们的特性可能存在重叠,但每个特性都有独特的功能。While there may be overlap in their features, each has unique capabilities. 可能需要在虚拟机上有一个或多个代理,具体取决于要求。Depending on your requirements, you may need one or more of the agents on your virtual machines.

你可能有一组特定的要求,这些要求在为特定虚拟机设置单个代理的情况下无法完全满足。You may have a specific set of requirements that can't be completely met with a single agent for a particular virtual machine. 例如,你可能想要使用需要 Azure 诊断扩展的指标警报,但同时又想要利用用于 VM 的 Azure Monitor 功能,该功能需要 Log Analytics 代理和依赖项代理。For example, you may want to use metric alerts which requires Azure diagnostics extension but also want to leverage the functionality of Azure Monitor for VMs which requires the Log Analytics agent and the Dependency agent. 在这样的情况下,可以使用多个代理。对于需要每个代理中的功能的客户,这很常见。In cases such as this, you can use multiple agents, and this is a common scenario for customers who require functionality from each.

代理摘要Summary of agents

下表对适用于 Windows 和 Linux 的 Azure Monitor 代理进行了快速比较。The following tables provide a quick comparison of the Azure Monitor agents for Windows and Linux. 以下部分提供了每个代理的更多详细信息。Further detail on each is provided in the section below.

Windows 代理Windows agents

Azure Monitor 代理(预览版)Azure Monitor agent (preview) 诊断Diagnostics
扩展 (WAD)extension (WAD)
Log AnalyticsLog Analytics
代理agent
依赖项Dependency
代理agent
支持的环境Environments supported AzureAzure
其他云Other cloud
本地On-premises
AzureAzure AzureAzure
其他云Other cloud
本地On-premises
AzureAzure
其他云Other cloud
本地On-premises
代理要求Agent requirements None None None 需要 Log Analytics 代理Requires Log Analytics agent
收集的数据Data collected 事件日志Event Logs
性能Performance
事件日志Event Logs
ETW 事件ETW events
性能Performance
基于文件的日志File based logs
IIS 日志IIS logs
.NET 应用日志.NET app logs
故障转储Crash dumps
代理诊断日志Agent diagnostics logs
事件日志Event Logs
性能Performance
基于文件的日志File based logs
见解和解决方案Insights and solutions
其他服务Other services
进程详细信息和依赖项Process details and dependencies
网络连接指标Network connection metrics
数据发送目标Data sent to Azure Monitor 日志Azure Monitor Logs
Azure Monitor 指标Azure Monitor Metrics
Azure 存储Azure Storage
事件中心Event Hub
Azure 存储Azure Storage
Azure Monitor 指标Azure Monitor Metrics
事件中心Event Hub
Azure Monitor 日志Azure Monitor Logs Azure Monitor 日志Azure Monitor Logs

Linux 代理Linux agents

Azure Monitor 代理(预览版)Azure Monitor agent (preview) 诊断Diagnostics
扩展 (LAD)extension (LAD)
TelegrafTelegraf
代理agent
Log AnalyticsLog Analytics
代理agent
依赖项Dependency
代理agent
支持的环境Environments supported AzureAzure AzureAzure AzureAzure
其他云Other cloud
本地On-premises
AzureAzure
其他云Other cloud
本地On-premises
AzureAzure
其他云Other cloud
本地On-premises
代理要求Agent requirements None None None None 需要 Log Analytics 代理Requires Log Analytics agent
收集的数据Data collected SyslogSyslog
性能Performance
SyslogSyslog
性能Performance
性能Performance SyslogSyslog
性能Performance
进程详细信息和依赖项Process details and dependencies
网络连接指标Network connection metrics
数据发送目标Data sent to Azure Monitor 日志Azure Monitor Logs
Azure 存储Azure Storage
Azure Monitor 指标Azure Monitor Metrics
事件中心Event Hub
Azure 存储Azure Storage
事件中心Event Hub
Azure Monitor 指标Azure Monitor Metrics Azure Monitor 日志Azure Monitor Logs Azure Monitor 日志Azure Monitor Logs

Log Analytics 代理Log Analytics agent

Log Analytics 代理从 Azure 中的虚拟机、其他云提供商和本地的来宾操作系统与工作负荷收集监视数据。The Log Analytics agent collects monitoring data from the guest operating system and workloads of virtual machines in Azure, other cloud providers, and on-premises. 它将数据收集到 Log Analytics 工作区中。It collects data into a Log Analytics workspace. Log Analytics 代理是 System Center Operations Manager 使用的代理,你可以通过多宿主代理计算机同时与管理组和 Azure Monitor 通信。The Log Analytics agent is the same agent used by System Center Operations Manager, and you can multihome agent computers to communicate with your management group and Azure Monitor simultaneously. Azure Monitor 中的某些见解和解决方案也需要此代理。This agent is also required by certain insights and solutions in Azure Monitor.

备注

适用于 Windows 的 Log Analytics 代理通常称作 Microsoft Monitoring Agent (MMA)。The Log Analytics agent for Windows is often referred to as Microsoft Monitoring Agent (MMA). 适用于 Linux 的 Log Analytics 代理通常称作 OMS 代理。The Log Analytics agent for Linux is often referred to as OMS agent.

如果需要执行以下操作,请使用 Log Analytics 代理:Use the Log Analytics agent if you need to:

Log Analytics 代理的限制包括:Limitations of the Log Analytics agent include:

  • 无法将数据发送到 Azure Monitor 指标、Azure 存储或 Azure 事件中心。Cannot send data to Azure Monitor Metrics, Azure Storage, or Azure Event Hubs.

Azure 诊断扩展Azure diagnostics extension

Azure 诊断扩展从 Azure 虚拟机和其他计算资源的来宾操作系统和工作负载收集监视数据。The Azure Diagnostics extension collects monitoring data from the guest operating system and workloads of Azure virtual machines and other compute resources. 它主要将数据收集到 Azure 存储中,但也允许你通过定义数据接收器将数据同时发送到其他目标(例如 Azure Monitor 指标和 Azure 事件中心)。It primarily collects data into Azure Storage but also allows you to define data sinks to also send data to other destinations such as Azure Monitor Metrics and Azure Event Hubs.

如果需要执行以下操作,请使用 Azure 诊断扩展:Use Azure diagnostic extension if you need to:

Azure 诊断扩展的限制包括:Limitations of Azure diagnostics extension include:

  • 只能与 Azure 资源配合使用。Can only be used with Azure resources.
  • 将数据发送到 Azure Monitor 日志的功能有限。Limited ability to send data to Azure Monitor Logs.

Telegraf 代理Telegraf agent

InfluxData Telegraf 代理用于将性能数据从 Linux 计算机收集到 Azure Monitor 指标。The InfluxData Telegraf agent is used to collect performance data from Linux computers to Azure Monitor Metrics.

如果需要执行以下操作,请使用 Telegraf 代理:Use Telegraf agent if you need to:

依赖关系代理Dependency agent

依赖关系代理用于收集在虚拟机上运行的进程的已发现数据,以及外部进程依赖项的已发现数据。The Dependency agent collects discovered data about processes running on the virtual machine and external process dependencies.

如果需要执行以下操作,请使用 Dependency Agent:Use the Dependency agent if you need to:

  • 使用服务映射解决方案的“映射”功能。Use the Map feature Service Map solution.

使用 Dependency Agent 时,请注意以下事项:Consider the following when using the Dependency agent:

  • 依赖项代理要求在同一个虚拟机上安装 Log Analytics 代理。The Dependency agent requires the Log Analytics agent to be installed on the same virtual machine.
  • 在 Linux VM 上,必须先安装 Log Analytics 代理,然后再安装 Azure 诊断扩展。On Linux VMs, the Log Analytics agent must be installed before the Azure Diagnostic Extension.

相较于代理的扩展Extensions compared to agents

WindowsLinux 的 Log Analytics 扩展在 Azure 虚拟机上安装 Log Analytics 代理。The Log Analytics extension for Windows and Linux install the Log Analytics agent on Azure virtual machines. Windows 和 Linux 的 Azure Monitor 依赖项扩展在 Azure 虚拟机上安装 Dependency Agent。The Azure Monitor Dependency extension for Windows and Linux install the Dependency agent on Azure virtual machines. 它们是如上所述的代理,但你可以通过虚拟机扩展对它们进行管理。These are the same agents described above but allow you to manage them through virtual machine extensions. 应尽可能使用扩展来安装和管理代理。You should use extensions to install and manage the agents whenever possible.

后续步骤Next steps

在以下站点获取每个代理的更多详细信息:Get more details on each of the agents at the following: