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
- If you are going to send performance data to a Log Analytics workspace, then you must have one created where you have at least contributor rights..
- Either a new or existing DCR described in Collect data with Azure Monitor Agent.
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.
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.
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.
Next steps
- Collect text logs by using Azure Monitor Agent.
- Learn more about Azure Monitor Agent.
- Learn more about data collection rules.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for