Modifier

Partager via


Collect performance counters with Azure Monitor Agent

Performance counters is one of the data sources used in a data collection rule (DCR). Details for the creation of the DCR are provided in Collect data with Azure Monitor Agent. This article provides additional details for the Windows events data source type.

Performance counters provide insight into the performance of hardware components, operating systems, and applications. Azure Monitor Agent can collect performance counters from Windows and Linux machines at frequent intervals for near real time analysis.

Prerequisites

Configure performance counters data source

Create a data collection rule, as described in Collect data with Azure Monitor Agent. In the Collect and deliver step, select Performance Counters from the Data source type dropdown.

For performance counters, select from a predefined set of objects and their sampling rate.

Screenshot that shows the Azure portal form to select basic performance counters in a data collection rule.

Select Custom to specify an XPath to collect any performance counters not available by default. Use the format \PerfObject(ParentInstance/ObjectInstance#InstanceIndex)\Counter. If the counter name contains an ampersand (&), replace it with &. For example, \Memory\Free & Zero Page List Bytes. You can view the default counters for examples.

Screenshot that shows the Azure portal form to select custom performance counters in a data collection rule.

Note

At this time, Microsoft.HybridCompute (Azure Arc-enabled servers) resources can't be viewed in Metrics Explorer (the Azure portal UX), but they can be acquired via the Metrics REST API (Metric Namespaces - List, Metric Definitions - List, and Metrics - List).

Destinations

Performance counters data can be sent to the following locations.

Destination Table / Namespace
Log Analytics workspace Perf
Azure Monitor Metrics Windows: Virtual Machine Guest
Linux: azure.vm.linux.guestmetrics

Note

On Linux, using Azure Monitor Metrics as the only destination is supported in v1.10.9.0 or higher.

Screenshot that shows configuration of an Azure Monitor Logs destination in a data collection rule.

Next steps