Share via


az load test-run server-metric

Note

This reference is part of the load extension for the Azure CLI (version 2.41.0 or higher). The extension will automatically install the first time you run an az load test-run server-metric command. Learn more about extensions.

Command group 'load test-run' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Command group to manage load test run server-metrics.

Command group to manage load test run server-metrics with add, list and remove.

Commands

Name Description Type Status
az load test-run server-metric add

Add a server-metric to a test run.

Extension Preview
az load test-run server-metric list

List all server-metrics for a test run.

Extension Preview
az load test-run server-metric remove

Remove a server-metric from a test run.

Extension Preview

az load test-run server-metric add

Preview

Command group 'load test-run server-metric' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Add a server-metric to a test run.

az load test-run server-metric add --aggregation
                                   --app-component-id
                                   --app-component-type
                                   --load-test-resource
                                   --metric-id
                                   --metric-name
                                   --metric-namespace
                                   --test-run-id
                                   [--resource-group]

Examples

Add a server metric for an app component to a test run.

az load test-run server-metric add --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg --metric-id "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Sample-rg/providers/Microsoft.Compute/virtualMachineScaleSets/sample-temp-vmss/providers/microsoft.insights/metricdefinitions/Percentage CPU" --metric-name  "Percentage CPU" --metric-namespace microsoft.compute/virtualmachinescalesets --aggregation Average --app-component-type Microsoft.Compute/virtualMachineScaleSets --app-component-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.Compute/virtualMachineScaleSets/app-comp-name

Required Parameters

--aggregation

Aggregation to be applied on the metric.

--app-component-id

Fully qualified resource ID of the App Component. For example, subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.

--app-component-type

Type of resource of the app component. Refer https://learn.microsoft.com/cli/azure/resource#az-resource-show.

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--metric-id
--metric-name

Name of the metric. Example, requests/duration.

--metric-namespace

Namespace of the server metric. Example, microsoft.insights/components.

--test-run-id -r

Test run ID of the load test run.

Optional Parameters

--resource-group -g

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

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 load test-run server-metric list

Preview

Command group 'load test-run server-metric' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List all server-metrics for a test run.

az load test-run server-metric list --load-test-resource
                                    --test-run-id
                                    [--resource-group]

Examples

List all server metrics for a test run.

az load test-run server-metric list --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--test-run-id -r

Test run ID of the load test run.

Optional Parameters

--resource-group -g

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

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 load test-run server-metric remove

Preview

Command group 'load test-run server-metric' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Remove a server-metric from a test run.

az load test-run server-metric remove --load-test-resource
                                      --metric-id
                                      --test-run-id
                                      [--resource-group]
                                      [--yes]

Examples

Remove a server metric from a test run.

az load test-run server-metric remove --test-run-id sample-test-run-id --load-test-resource sample-alt-resource --resource-group sample-rg --metric-id "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Sample-rg/providers/Microsoft.Compute/virtualMachineScaleSets/Sample-temp-vmss/providers/microsoft.insights/metricdefinitions/Percentage CPU" --yes

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--metric-id
--test-run-id -r

Test run ID of the load test run.

Optional Parameters

--resource-group -g

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

--yes -y

Do not prompt for confirmation.

Default value: False
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.