Skip to content

Commit e372c8d

Browse files
committed
Moving changes to new PR
1 parent 895cbf5 commit e372c8d

File tree

1 file changed

+41
-14
lines changed

1 file changed

+41
-14
lines changed

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

Lines changed: 41 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,55 @@ 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 table provides different examples of log queries that retrieve performance records.
55+
56+
| Query | Description |
57+
|:-------------------------------------------------------------|:------------------------------------------------|
58+
| Perf | All performance data |
59+
| Perf &#124; where Computer == "MyComputer" | All performance data from a particular computer |
60+
| Perf &#124; where CounterName == "Current Disk Queue Length" | All performance data for a particular counter |
61+
62+
<br>
63+
<details>
64+
<summary>Expand for more sample queries</summary>
65+
66+
| Query | Description |
67+
|:------|:------------|
68+
| Perf &#124; where ObjectName == "Processor" and CounterName == "% Processor Time" and InstanceName == "_Total" &#124; summarize AVGCPU = avg(CounterValue) by Computer |Average CPU utilization across all computers |
69+
| Perf &#124; where CounterName == "% Processor Time" &#124; summarize AggregatedValue = max(CounterValue) by Computer |Maximum CPU utilization across all computers |
70+
| Perf &#124; where ObjectName == "LogicalDisk" and CounterName == "Current Disk Queue Length" and Computer == "MyComputerName" &#124; summarize AggregatedValue = avg(CounterValue) by InstanceName |Average current disk queue length across all the instances of a given computer |
71+
| Perf &#124; where CounterName == "Disk Transfers/sec" &#124; summarize AggregatedValue = percentile(CounterValue, 95) by Computer |95th percentile of disk transfers/sec across all computers |
72+
| Perf &#124; where CounterName == "% Processor Time" and InstanceName == "_Total" &#124; summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 1h), Computer |Hourly average of CPU usage across all computers |
73+
| Perf &#124; where Computer == "MyComputer" and CounterName startswith_cs "%" and InstanceName == "_Total" &#124; summarize AggregatedValue = percentile(CounterValue, 70) by bin(TimeGenerated, 1h), CounterName | Hourly 70th percentile of every percent counter for a particular computer |
74+
| Perf &#124; where CounterName == "% Processor Time" and InstanceName == "_Total" and Computer == "MyComputer" &#124; summarize ["min(CounterValue)"] = min(CounterValue), ["avg(CounterValue)"] = avg(CounterValue), ["percentile75(CounterValue)"] = percentile(CounterValue, 75), ["max(CounterValue)"] = max(CounterValue) by bin(TimeGenerated, 1h), Computer |Hourly average, minimum, maximum, and 75-percentile CPU usage for a specific computer |
75+
| Perf &#124; where ObjectName == "MSSQL$INST2:Databases" and InstanceName == "master" | All performance data from the database performance object for the master database from the named SQL Server instance INST2 |
76+
77+
</details>
78+
79+
Additional samples queries are available at [Queries for the Perf table](/azure/azure-monitor/reference/queries/perf).
80+
5481
## Next steps
5582

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).
83+
* [Collect text logs by using Azure Monitor Agent](data-collection-text-log.md).
84+
* Learn more about [Azure Monitor Agent](azure-monitor-agent-overview.md).
85+
* Learn more about [data collection rules](../essentials/data-collection-rule-overview.md).

0 commit comments

Comments
 (0)