Skip to content

Commit 135d271

Browse files
authored
Merge pull request #284057 from kainawroth/kainawroth-perf-new
Adding perf counter tables to AMA doc [from PR #283490]
2 parents 6655d4e + 92dcb39 commit 135d271

File tree

1 file changed

+42
-14
lines changed

1 file changed

+42
-14
lines changed

articles/azure-monitor/agents/data-collection-performance.md

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ ms.reviewer: jeffwo
1010
---
1111

1212
# 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.
1415

1516
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.
1617

1718
## Prerequisites
1819

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).
2122

22-
## Configure performance counters data source
23+
## Configure performance counters data source
2324

2425
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.
2526

@@ -30,29 +31,56 @@ For performance counters, select from a predefined set of objects and their samp
3031
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.
3132

3233
:::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-
3434

3535
> [!NOTE]
3636
> 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).
3737
38-
3938
## Destinations
4039

4140
Performance counters data can be sent to the following locations.
4241

43-
| Destination | Table / Namespace |
44-
|:---|:---|
45-
| Log Analytics workspace | [Perf](/azure/azure-monitor/reference/tables/perf) |
46-
| Azure Monitor Metrics | Windows: Virtual Machine Guest<br>Linux: azure.vm.linux.guestmetrics
42+
| Destination | Table / Namespace |
43+
|:------------------------|:---------------------------------------------------------------------|
44+
| Log Analytics workspace | Perf (see [Azure Monitor Logs reference](/azure/azure-monitor/reference/tables/perf#columns)) |
45+
| Azure Monitor Metrics | Windows: Virtual Machine Guest<br>Linux: azure.vm.linux.guestmetrics |
4746

48-
4947
> [!NOTE]
5048
> On Linux, using Azure Monitor Metrics as the only destination is supported in v1.10.9.0 or higher.
5149
5250
:::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.":::
5351

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"
76+
| summarize ["min(CounterValue)"] = min(CounterValue), ["avg(CounterValue)"] = avg(CounterValue), ["percentile75(CounterValue)"] = percentile(CounterValue, 75), ["max(CounterValue)"] = max(CounterValue) by bin(TimeGenerated, 1h), Computer
77+
```
78+
79+
> [!NOTE]
80+
> Additional query examples are available at [Queries for the Perf table](/azure/azure-monitor/reference/queries/perf).
81+
5482
## Next steps
5583

56-
- [Collect text logs by using Azure Monitor Agent](data-collection-text-log.md).
57-
- Learn more about [Azure Monitor Agent](azure-monitor-agent-overview.md).
58-
- Learn more about [data collection rules](../essentials/data-collection-rule-overview.md).
84+
* [Collect text logs by using Azure Monitor Agent](data-collection-text-log.md).
85+
* Learn more about [Azure Monitor Agent](azure-monitor-agent-overview.md).
86+
* Learn more about [data collection rules](../essentials/data-collection-rule-overview.md).

0 commit comments

Comments
 (0)