Share via


az storage metrics

Manage storage service metrics.

Commands

Name Description Type Status
az storage metrics show

Show metrics settings for a storage account.

Core GA
az storage metrics update

Update metrics settings for a storage account.

Core GA

az storage metrics show

Show metrics settings for a storage account.

az storage metrics show [--account-key]
                        [--account-name]
                        [--connection-string]
                        [--interval {both, hour, minute}]
                        [--sas-token]
                        [--services]
                        [--timeout]

Examples

Show metrics settings for a storage account. (autogenerated)

az storage metrics show --account-key 00000000 --account-name MyAccount

Optional Parameters

--account-key

Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.

--account-name

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--interval

Filter the set of metrics to retrieve by time interval.

Accepted values: both, hour, minute
Default value: both
--sas-token

A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--services

The storage services from which to retrieve metrics info: (b)lob (q)ueue (t)able. Can be combined.

Default value: bfqt
--timeout

Request timeout in seconds. Applies to each call to the service.

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 storage metrics update

Update metrics settings for a storage account.

az storage metrics update --retention
                          --services
                          [--account-key]
                          [--account-name]
                          [--api {false, true}]
                          [--connection-string]
                          [--hour {false, true}]
                          [--minute {false, true}]
                          [--sas-token]
                          [--timeout]

Examples

Update metrics settings for a storage account. (autogenerated)

az storage metrics update --account-name MyAccount --api true --hour true --minute true --retention 10 --services bfqt

Update metrics settings for a storage account by connection string. (autogenerated)

az storage metrics update --api true --connection-string $connectionString --hour true --minute true --retention 10 --services bfqt

Required Parameters

--retention

Number of days for which to retain metrics. 0 to disable. Applies to both hour and minute metrics if both are specified.

--services

The storage services from which to retrieve metrics info: (b)lob (q)ueue (t)able. Can be combined.

Optional Parameters

--account-key

Storage account key. Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_KEY.

--account-name

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT. Must be used in conjunction with either storage account key or a SAS token. If neither are present, the command will try to query the storage account key using the authenticated Azure account. If a large number of storage commands are executed the API quota may be hit.

--api

Specify whether to include API in metrics. Applies to both hour and minute metrics if both are specified. Must be specified if hour or minute metrics are enabled and being updated.

Accepted values: false, true
--connection-string

Storage account connection string. Environment variable: AZURE_STORAGE_CONNECTION_STRING.

--hour

Update the hourly metrics.

Accepted values: false, true
--minute

Update the by-minute metrics.

Accepted values: false, true
--sas-token

A Shared Access Signature (SAS). Must be used in conjunction with storage account name. Environment variable: AZURE_STORAGE_SAS_TOKEN.

--timeout

Request timeout in seconds. Applies to each call to the service.

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.