You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/agents/data-collection-performance.md
+42-14Lines changed: 42 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,16 +10,17 @@ ms.reviewer: jeffwo
10
10
---
11
11
12
12
# Collect performance counters with Azure Monitor Agent
13
-
**Performance counters** is one of the data sources used in a [data collection rule (DCR)](../essentials/data-collection-rule-create-edit.md). Details for the creation of the DCR are provided in [Collect data with Azure Monitor Agent](./azure-monitor-agent-data-collection.md). This article provides additional details for the Windows events data source type.
13
+
14
+
**Performance counters** is one of the data sources used in a [data collection rule (DCR)](../essentials/data-collection-rule-create-edit.md). Details for the creation of the DCR are provided in [Collect data with Azure Monitor Agent](./azure-monitor-agent-data-collection.md). This article provides more details for the Windows events data source type.
14
15
15
16
Performance counters provide insight into the performance of hardware components, operating systems, and applications. [Azure Monitor Agent](azure-monitor-agent-overview.md) can collect performance counters from Windows and Linux machines at frequent intervals for near real time analysis.
16
17
17
18
## Prerequisites
18
19
19
-
- If you are going to send performance data to a [Log Analytics workspace](../logs/log-analytics-workspace-overview.md), then you must have one created where you have at least [contributor rights](../logs/manage-access.md#azure-rbac)..
20
-
- Either a new or existing DCR described in [Collect data with Azure Monitor Agent](./azure-monitor-agent-data-collection.md).
20
+
* If you're going to send performance data to a [Log Analytics workspace](../logs/log-analytics-workspace-overview.md), then you must have one created where you have at least [contributor rights](../logs/manage-access.md#azure-rbac).
21
+
* Either a new or existing DCR described in [Collect data with Azure Monitor Agent](./azure-monitor-agent-data-collection.md).
21
22
22
-
## Configure performance counters data source
23
+
## Configure performance counters data source
23
24
24
25
Create a data collection rule, as described in [Collect data with Azure Monitor Agent](./azure-monitor-agent-data-collection.md). In the **Collect and deliver** step, select **Performance Counters** from the **Data source type** dropdown.
25
26
@@ -30,29 +31,56 @@ For performance counters, select from a predefined set of objects and their samp
30
31
Select **Custom** to specify an [XPath](https://www.w3schools.com/xml/xpath_syntax.asp) 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.
31
32
32
33
:::image type="content" source="media/data-collection-performance/data-source-performance-custom.png" lightbox="media/data-collection-performance/data-source-performance-custom.png" alt-text="Screenshot that shows the Azure portal form to select custom performance counters in a data collection rule." border="false":::
33
-
34
34
35
35
> [!NOTE]
36
36
> At this time, Microsoft.HybridCompute ([Azure Arc-enabled servers](../../azure-arc/servers/overview.md)) resources can't be viewed in [Metrics Explorer](../essentials/metrics-getting-started.md) (the Azure portal UX), but they can be acquired via the Metrics REST API (Metric Namespaces - List, Metric Definitions - List, and Metrics - List).
37
37
38
-
39
38
## Destinations
40
39
41
40
Performance counters data can be sent to the following locations.
> On Linux, using Azure Monitor Metrics as the only destination is supported in v1.10.9.0 or higher.
51
49
52
50
:::image type="content" source="media/data-collection-performance/destination-metrics.png" lightbox="media/data-collection-performance/destination-metrics.png" alt-text="Screenshot that shows configuration of an Azure Monitor Logs destination in a data collection rule.":::
53
51
52
+
## Log queries with performance records
53
+
54
+
The following queries are examples to retrieve performance records.
55
+
56
+
#### All performance data from a particular computer
57
+
58
+
```query
59
+
Perf
60
+
| where Computer == "MyComputer"
61
+
```
62
+
63
+
#### Average CPU utilization across all computers
64
+
65
+
```query
66
+
Perf
67
+
| where ObjectName == "Processor" and CounterName == "% Processor Time" and InstanceName == "_Total"
68
+
| summarize AVGCPU = avg(CounterValue) by Computer
69
+
```
70
+
71
+
#### Hourly average, minimum, maximum, and 75-percentile CPU usage for a specific computer
72
+
73
+
```query
74
+
Perf
75
+
| where CounterName == "% Processor Time" and InstanceName == "_Total" and Computer == "MyComputer"
0 commit comments