az monitor data-collection rule performance-counter

Note

This reference is part of the monitor-control-service extension for the Azure CLI (version 2.55.0 or higher). The extension will automatically install the first time you run an az monitor data-collection rule performance-counter command. Learn more about extensions.

Manage Log performance counter data source.

Commands

Name Description Type Status
az monitor data-collection rule performance-counter add

Add a Log performance counter data source.

Extension GA
az monitor data-collection rule performance-counter delete

Delete a Log performance counter data source.

Extension GA
az monitor data-collection rule performance-counter list

List Log performance counter data sources.

Extension GA
az monitor data-collection rule performance-counter show

Show a Log performance counter data source.

Extension GA
az monitor data-collection rule performance-counter update

Update a Log performance counter data source.

Extension GA

az monitor data-collection rule performance-counter add

Add a Log performance counter data source.

az monitor data-collection rule performance-counter add --counter-specifiers
                                                        --name
                                                        --resource-group
                                                        --rule-name
                                                        --sampling-frequency
                                                        --streams {Microsoft-InsightsMetrics, Microsoft-Perf}

Examples

Add a Log performance counter data source

az monitor data-collection rule performance-counter add --rule-name "myCollectionRule" --resource-group "myResourceGroup" --name "team2ExtraCounters" --streams "Microsoft-Perf" --counter-specifiers "\\Process(_Total)\\Thread Count" "\\LogicalDisk(_Total)\\Free Megabytes" --sampling-frequency 30

Required Parameters

--counter-specifiers

A list of specifier names of the performance counters you want to collect.Use a wildcard (*) to collect a counter for all instances. To get a list of performance counters on Windows, run the command 'typeperf'.

--name -n

A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--rule-name

The name of the data collection rule. The name is case insensitive.

--sampling-frequency

The number of seconds between consecutive counter measurements (samples).

--streams

List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to.

accepted values: Microsoft-InsightsMetrics, Microsoft-Perf
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az monitor data-collection rule performance-counter delete

Delete a Log performance counter data source.

az monitor data-collection rule performance-counter delete --name
                                                           --resource-group
                                                           --rule-name

Examples

Delete a Log performance counter data source

az monitor data-collection rule performance-counter delete --rule-name "myCollectionRule" --resource-group "myResourceGroup" --name "team2ExtraCounters"

Required Parameters

--name -n

A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--rule-name

The name of the data collection rule. The name is case insensitive.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az monitor data-collection rule performance-counter list

List Log performance counter data sources.

az monitor data-collection rule performance-counter list --resource-group
                                                         --rule-name

Examples

List Log performance counter data sources

az monitor data-collection rule performance-counter list --rule-name "myCollectionRule" --resource-group "myResourceGroup"

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--rule-name

The name of the data collection rule. The name is case insensitive.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az monitor data-collection rule performance-counter show

Show a Log performance counter data source.

az monitor data-collection rule performance-counter show --name
                                                         --resource-group
                                                         --rule-name

Examples

Show a Log performance counter data source

az monitor data-collection rule performance-counter show --rule-name "myCollectionRule" --resource-group "myResourceGroup" --name "appTeamExtraCounters"

Required Parameters

--name -n

A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--rule-name

The name of the data collection rule. The name is case insensitive.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az monitor data-collection rule performance-counter update

Update a Log performance counter data source.

az monitor data-collection rule performance-counter update --name
                                                           --resource-group
                                                           --rule-name
                                                           [--counter-specifiers]
                                                           [--sampling-frequency]
                                                           [--streams {Microsoft-InsightsMetrics, Microsoft-Perf}]

Examples

Update a Log performance counter data source

az monitor data-collection rule performance-counter update --rule-name "myCollectionRule" --resource-group "myResourceGroup" --name "team2ExtraCounters"

Required Parameters

--name -n

A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--rule-name

The name of the data collection rule. The name is case insensitive.

Optional Parameters

--counter-specifiers

A list of specifier names of the performance counters you want to collect.Use a wildcard (*) to collect a counter for all instances. To get a list of performance counters on Windows, run the command 'typeperf'.

--sampling-frequency

The number of seconds between consecutive counter measurements (samples).

--streams

List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to.

accepted values: Microsoft-InsightsMetrics, Microsoft-Perf
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.