Azure Monitor 中的 Azure 存储指标Azure Storage metrics in Azure Monitor

使用 Azure 存储的指标可以分析使用趋势、跟踪请求,以及诊断存储帐户的问题。With metrics on Azure Storage, you can analyze usage trends, trace requests, and diagnose issues with your storage account.

Azure Monitor 提供统一的用户界面用于监视不同的 Azure 服务。Azure Monitor provides unified user interfaces for monitoring across different Azure services. 有关详细信息,请参阅 Azure MonitorFor more information, see Azure Monitor. Azure 存储通过向 Azure Monitor 平台发送指标数据来与 Azure Monitor 集成。Azure Storage integrates Azure Monitor by sending metric data to the Azure Monitor platform.

访问指标Access metrics

Azure Monitor 提供多种访问指标的方法。Azure Monitor provides multiple ways to access metrics. 可从 Azure 门户、Azure Monitor API(REST 和 .NET)以及分析解决方案(例如事件中心)访问指标。You can access them from the Azure portal, the Azure Monitor APIs (REST, and .NET) and analysis solutions such as Event Hubs. 有关详细信息,请参阅 Azure Monitor 指标For more information, see Azure Monitor Metrics.

默认情况下,已启用指标,并且可访问过去 93 天的数据。Metrics are enabled by default, and you can access the past 93 days of data. 如需将数据保留更长一段时间,可将指标数据存档到 Azure 存储帐户。If you need to retain data for a longer period of time, you can archive metrics data to an Azure Storage account. 可在 Azure Monitor 的 诊断设置 中完成这种配置。This is configured in diagnostic settings in Azure Monitor.

在 Azure 门户中访问指标Access metrics in the Azure portal

可在 Azure 门户中访问不同时间的指标。You can monitor metrics over time in the Azure portal. 以下示例演示如何查看帐户级别的事务The following example shows how to view Transactions at account level.

在 Azure 门户中访问指标的屏幕截图

对于支持维度的指标,可使用所需的维度值筛选指标。For metrics supporting dimensions, you can filter metric with the desired dimension value. 下面的示例演示了如何通过选择“API 名称”维度的值,在特定操作上查看帐户级别的“事务”。The following example shows how to view Transactions at account level on a specific operation by selecting values for API Name dimension.

在 Azure 门户中访问包含维度的指标的屏幕截图

使用 REST API 访问指标Access metrics with the REST API

Azure Monitor 提供 REST API 用于读取指标定义和值。Azure Monitor provides REST APIs to read metric definition and values. 本部分介绍如何读取存储指标。This section shows you how to read the storage metrics. 所有 REST API 中使用了资源 ID。Resource ID is used in all REST APIS. 有关详细信息,请阅读“了解存储中服务的资源 ID”。For more information, please read Understanding resource ID for services in Storage.

以下示例演示如何在命令行中使用 ArmClient,借助 REST API 来简化测试。The following example shows how to use ArmClient at the command line to simplify testing with the REST API.

使用 REST API 列出帐户级指标定义List account level metric definition with the REST API

以下示例演示如何列出帐户级别的指标定义:The following example shows how to list metric definition at account level:

# Login to Azure and enter your credentials when prompted.
> armclient login Mooncake

> armclient GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}/providers/microsoft.insights/metricdefinitions?api-version=2018-01-01

如果想要列出 Blob、表、文件或队列的指标定义,必须使用 API 指定每个服务的不同资源 ID。If you want to list the metric definitions for blob, table, file, or queue, you must specify different resource IDs for each service with the API.

响应包含 JSON 格式的指标定义:The response contains the metric definition in JSON format:

{
  "value": [
    {
      "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}/providers/microsoft.insights/metricdefinitions/UsedCapacity",
      "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}",
      "category": "Capacity",
      "name": {
        "value": "UsedCapacity",
        "localizedValue": "Used capacity"
      },
      "isDimensionRequired": false,
      "unit": "Bytes",
      "primaryAggregationType": "Average",
      "metricAvailabilities": [
        {
          "timeGrain": "PT1M",
          "retention": "P30D"
        },
        {
          "timeGrain": "PT1H",
          "retention": "P30D"
        }
      ]
    },
    ... next metric definition
  ]
}

使用 REST API 读取帐户级指标值Read account-level metric values with the REST API

以下示例演示如何读取帐户级别的指标数据:The following example shows how to read metric data at account level:

> armclient GET "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}/providers/microsoft.insights/metrics?metricnames=Availability&api-version=2018-01-01&aggregation=Average&interval=PT1H"

在上述示例中,如果想要读取 Blob、表、文件或队列的指标值,必须使用 API 指定每个服务的不同资源 ID。In above example, if you want to read metric values for blob, table, file, or queue, you must specify different resource IDs for each service with the API.

以下响应包含 JSON 格式的指标值:The following response contains metric values in JSON format:

{
  "cost": 0,
  "timespan": "2017-09-07T17:27:41Z/2017-09-07T18:27:41Z",
  "interval": "PT1H",
  "value": [
    {
      "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}/providers/Microsoft.Insights/metrics/Availability",
      "type": "Microsoft.Insights/metrics",
      "name": {
        "value": "Availability",
        "localizedValue": "Availability"
      },
      "unit": "Percent",
      "timeseries": [
        {
          "metadatavalues": [],
          "data": [
            {
              "timeStamp": "2017-09-07T17:27:00Z",
              "average": 100.0
            }
          ]
        }
      ]
    }
  ]
}

使用 .NET SDK 访问指标Access metrics with the .NET SDK

Azure Monitor 提供 .NET SDK,用于读取指标定义和值。Azure Monitor provides .NET SDK to read metric definition and values. 示例代码演示如何通过不同的参数来使用 SDK。The sample code shows how to use the SDK with different parameters. 对于存储指标,需使用 0.18.0-preview 或更高版本。You need to use 0.18.0-preview or later version for storage metrics. 资源 ID 用在 .NET SDK 中。Resource ID is used in .NET SDK. 有关详细信息,请阅读“了解存储中服务的资源 ID”。For more information, please read Understanding resource ID for services in Storage.

以下示例说明了如何使用 Azure Monitor .NET SDK 来读取存储指标。The following example shows how to use Azure Monitor .NET SDK to read storage metrics.

使用 .NET SDK 列出帐户级指标定义List account level metric definition with the .NET SDK

以下示例演示如何列出帐户级别的指标定义:The following example shows how to list metric definition at account level:

    public static async Task ListStorageMetricDefinition()
    {
        // Resource ID for storage account
        var resourceId = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}";
        var subscriptionId = "{SubscriptionID}";
        // How to identify Tenant ID, Application ID and Access Key: https://docs.azure.cn/active-directory/develop/howto-create-service-principal-portal/
        var tenantId = "{TenantID}";
        var applicationId = "{ApplicationID}";
        var accessKey = "{AccessKey}";

        // Using metrics in Azure Monitor is currently free. However, if you use additional solutions ingesting metrics data, you may be billed by these solutions. For example, you are billed by Azure Storage if you archive metrics data to an Azure Storage account. Or you are billed by Operation Management Suite (OMS) if you stream metrics data to OMS for advanced analysis.
        MonitorManagementClient readOnlyClient = AuthenticateWithReadOnlyClient(tenantId, applicationId, accessKey, subscriptionId).Result;
        IEnumerable<MetricDefinition> metricDefinitions = await readOnlyClient.MetricDefinitions.ListAsync(resourceUri: resourceId, cancellationToken: new CancellationToken());

        foreach (var metricDefinition in metricDefinitions)
        {
            //Enumrate metric definition:
            //    Id
            //    ResourceId
            //    Name
            //    Unit
            //    MetricAvailabilities
            //    PrimaryAggregationType
            //    Dimensions
            //    IsDimensionRequired
        }
    }

如果想要列出 Blob、表、文件或队列的指标定义,必须使用 API 指定每个服务的不同资源 ID。If you want to list the metric definitions for blob, table, file, or queue, you must specify different resource IDs for each service with the API.

使用 .NET SDK 读取指标值Read metric values with the .NET SDK

以下示例演示如何读取帐户级别的 UsedCapacity 数据:The following example shows how to read UsedCapacity data at account level:

    public static async Task ReadStorageMetricValue()
    {
        // Resource ID for storage account
        var resourceId = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}";
        var subscriptionId = "{SubscriptionID}";
        // How to identify Tenant ID, Application ID and Access Key: https://docs.azure.cn/active-directory/develop/howto-create-service-principal-portal/
        var tenantId = "{TenantID}";
        var applicationId = "{ApplicationID}";
        var accessKey = "{AccessKey}";

        MonitorClient readOnlyClient = AuthenticateWithReadOnlyClient(tenantId, applicationId, accessKey, subscriptionId).Result;

        Microsoft.Azure.Management.Monitor.Models.Response Response;

        string startDate = DateTime.Now.AddHours(-3).ToUniversalTime().ToString("o");
        string endDate = DateTime.Now.ToUniversalTime().ToString("o");
        string timeSpan = startDate + "/" + endDate;

        Response = await readOnlyClient.Metrics.ListAsync(
            resourceUri: resourceId,
            timespan: timeSpan,
            interval: System.TimeSpan.FromHours(1),
            metricnames: "UsedCapacity",

            aggregation: "Average",
            resultType: ResultType.Data,
            cancellationToken: CancellationToken.None);

        foreach (var metric in Response.Value)
        {
            //Enumrate metric value
            //    Id
            //    Name
            //    Type
            //    Unit
            //    Timeseries
            //        - Data
            //        - Metadatavalues
        }
    }

在上述示例中,如果想要读取 Blob、表、文件或队列的指标值,必须使用 API 指定每个服务的不同资源 ID。In above example, if you want to read metric values for blob, table, file, or queue, you must specify different resource IDs for each service with the API.

使用 .NET SDK 读取多维指标值Read multi-dimensional metric values with the .NET SDK

对于多维指标,如果需要读取基于特定维度值的指标数据,则需定义元数据筛选器。For multi-dimensional metrics, you need to define meta data filter if you want to read metric data on specific dimension value.

以下示例演示如何根据支持多维的指标读取指标数据:The following example shows how to read metric data on the metric supporting multi-dimension:

    public static async Task ReadStorageMetricValueTest()
    {
        // Resource ID for blob storage
        var resourceId = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}/blobServices/default";
        var subscriptionId = "{SubscriptionID}";
        // How to identify Tenant ID, Application ID and Access Key: https://docs.azure.cn/active-directory/develop/howto-create-service-principal-portal/
        var tenantId = "{TenantID}";
        var applicationId = "{ApplicationID}";
        var accessKey = "{AccessKey}";

        MonitorManagementClient readOnlyClient = AuthenticateWithReadOnlyClient(tenantId, applicationId, accessKey, subscriptionId).Result;

        Microsoft.Azure.Management.Monitor.Models.Response Response;

        string startDate = DateTime.Now.AddHours(-3).ToUniversalTime().ToString("o");
        string endDate = DateTime.Now.ToUniversalTime().ToString("o");
        string timeSpan = startDate + "/" + endDate;
        // It's applicable to define meta data filter when a metric support dimension
        // More conditions can be added with the 'or' and 'and' operators, example: BlobType eq 'BlockBlob' or BlobType eq 'PageBlob'
        ODataQuery<MetadataValue> odataFilterMetrics = new ODataQuery<MetadataValue>(
            string.Format("BlobType eq '{0}'", "BlockBlob"));

        Response = readOnlyClient.Metrics.List(
                        resourceUri: resourceId,
                        timespan: timeSpan,
                        interval: System.TimeSpan.FromHours(1),
                        metricnames: "BlobCapacity",
                        odataQuery: odataFilterMetrics,
                        aggregation: "Average",
                        resultType: ResultType.Data);

        foreach (var metric in Response.Value)
        {
            //Enumrate metric value
            //    Id
            //    Name
            //    Type
            //    Unit
            //    Timeseries
            //        - Data
            //        - Metadatavalues
        }
    }

了解 Azure 存储中服务的资源 IDUnderstanding resource ID for services in Azure Storage

资源 ID 是资源在 Azure 中的唯一标识符。Resource ID is a unique identifier of a resource in Azure. 使用 Azure Monitor REST API 读取指标定义或值时,必须使用要对其执行操作的资源的资源 ID。When you use the Azure Monitor REST API to read metrics definitions or values, you must use resource ID for the resource on which you intend to operate. 资源 ID 模板遵循以下格式:The resource ID template follows this format:

/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

存储通过 Azure Monitor 提供存储帐户级别和服务级别的指标。Storage provides metrics at both the storage account level and the service level with Azure Monitor. 例如,可以仅检索 Blob 存储的指标。For example, you can retrieve metrics for just Blob storage. 每个级别有其自身的资源 ID,用于仅检索该级别的指标。Each level has its own resource ID, which is used to retrieve the metrics for just that level.

存储帐户的资源 IDResource ID for a storage account

下面显示了指定存储帐户的资源 ID 时所用的格式。The following shows the format for specifying the Resource ID for a storage account.

/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}

存储服务的资源 IDResource ID for the storage services

下面显示了指定每个存储服务的资源 ID 时所用的格式。The following shows the format for specifying the Resource ID for each of the storage services.

  • Blob 服务资源 IDBlob service resource ID
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}/blobServices/default
  • 表服务资源 IDTable service resource ID
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}/tableServices/default
  • 队列服务资源 IDQueue service resource ID
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}/queueServices/default
  • 文件服务资源 IDFile service resource ID
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}/fileServices/default

Azure Monitor REST API 中的资源 IDResource ID in Azure Monitor REST API

下面显示了调用 Azure Monitor REST API 时所用的模式。The following shows the pattern used when calling the Azure Monitor REST API.

GET {resourceId}/providers/microsoft.insights/metrics?{parameters}

容量度量值Capacity metrics

容量指标每隔一小时发送到 Azure Monitor。Capacity metrics values are sent to Azure Monitor every hour. 值每日刷新。The values are refreshed daily. 时间粒度定义呈现指标值的时间间隔。The time grain defines the time interval for which metrics values are presented. 所有容量指标的受支持时间粒度为一小时 (PT1H)。The supported time grain for all capacity metrics is one hour (PT1H).

Azure 存储在 Azure Monitor 中提供以下容量指标。Azure Storage provides the following capacity metrics in Azure Monitor.

帐户级别Account Level

指标名称Metric Name 说明Description
UsedCapacityUsedCapacity 存储帐户使用的存储量。The amount of storage used by the storage account. 对于标准存储帐户,该指标是 Blob、表、文件和队列使用的容量总和。For standard storage accounts, it's the sum of capacity used by blob, table, file, and queue. 对于高级存储帐户和 Blob 存储帐户,它与 BlobCapacity 相同。For premium storage accounts and Blob storage accounts, it is the same as BlobCapacity.

单位:字节Unit: Bytes
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024

Blob 存储Blob storage

指标名称Metric Name 说明Description
BlobCapacityBlobCapacity 存储帐户中使用的 Blob 存储总计。The total of Blob storage used in the storage account.

单位:字节Unit: Bytes
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024
维度:BlobTypeBlobTier定义Dimensions: BlobType, and BlobTier (Definition)
BlobCountBlobCount 在存储帐户中存储的 Blob 对象数。The number of blob objects stored in the storage account.

单位:计数Unit: Count
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024
维度:BlobTypeBlobTier定义Dimensions: BlobType, and BlobTier (Definition)
ContainerCountContainerCount 存储帐户中的容器数。The number of containers in the storage account.

单位:计数Unit: Count
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024
IndexCapacityIndexCapacity ADLS Gen2 分层索引所使用的存储量The amount of storage used by ADLS Gen2 Hierarchical Index

单元:字节Unit: Bytes
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024

表存储Table storage

指标名称Metric Name 说明Description
TableCapacityTableCapacity 存储帐户使用的表存储量。The amount of Table storage used by the storage account.

单位:字节Unit: Bytes
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024
TableCountTableCount 存储帐户中的表数目。The number of tables in the storage account.

单位:计数Unit: Count
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024
TableEntityCountTableEntityCount 存储帐户中的表实体数目。The number of table entities in the storage account.

单位:计数Unit: Count
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024

队列存储Queue storage

指标名称Metric Name 说明Description
QueueCapacityQueueCapacity 存储帐户使用的队列存储量。The amount of Queue storage used by the storage account.

单位:字节Unit: Bytes
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024
QueueCountQueueCount 存储帐户中的队列数目。The number of queues in the storage account.

单位:计数Unit: Count
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024
QueueMessageCountQueueMessageCount 存储帐户中未失效的队列消息数目。The number of unexpired queue messages in the storage account.

单位:计数Unit: Count
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024

文件存储File storage

指标名称Metric Name 说明Description
FileCapacityFileCapacity 存储帐户使用的文件存储量。The amount of File storage used by the storage account.

单位:字节Unit: Bytes
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024
FileCountFileCount 存储帐户中的文件数目。The number of files in the storage account.

单位:计数Unit: Count
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024
FileShareCountFileShareCount 存储帐户中的文件共享数目。The number of file shares in the storage account.

单位:计数Unit: Count
聚合类型:平均值Aggregation Type: Average
值示例:1024Value example: 1024

事务指标Transaction metrics

从 Azure 存储到 Azure Monitor 的每个存储帐户请求都会发出事务指标。Transaction metrics are emitted on every request to a storage account from Azure Storage to Azure Monitor. 如果存储帐户中没有任何活动,则在此期间不会有关于事务指标的数据。In the case of no activity on your storage account, there will be no data on transaction metrics in the period. 所有事务指标在帐户和服务级别(Blob 存储、表存储、Azure 文件和队列存储)提供。All transaction metrics are available at both account and service level (Blob storage, Table storage, Azure Files, and Queue storage). 时间粒度定义呈现指标值的时间间隔。The time grain defines the time interval that metric values are presented. 所有事务指标的受支持时间粒度为 PT1H 和 PT1M。The supported time grains for all transaction metrics are PT1H and PT1M.

Azure 存储在 Azure Monitor 中提供以下事务指标。Azure Storage provides the following transaction metrics in Azure Monitor.

指标名称Metric Name 说明Description
事务Transactions 向存储服务或指定的 API 操作发出的请求数。The number of requests made to a storage service or the specified API operation. 此数字包括成功和失败的请求数,以及引发错误的请求数。This number includes successful and failed requests, as well as requests that produced errors.

单位:计数Unit: Count
聚合类型:总计Aggregation Type: Total
适用的维度:ResponseType、GeoType、ApiName 和 Authentication(定义Applicable dimensions: ResponseType, GeoType, ApiName, and Authentication (Definition)
值示例:1024Value example: 1024
流入量Ingress 流入数据量。The amount of ingress data. 此数字包括从外部客户端到 Azure 存储流入的数据量,以及流入 Azure 中的数据量。This number includes ingress from an external client into Azure Storage as well as ingress within Azure.

单位:字节Unit: Bytes
聚合类型:总计Aggregation Type: Total
适用的维度:GeoType、ApiName 和 Authentication(定义Applicable dimensions: GeoType, ApiName, and Authentication (Definition)
值示例:1024Value example: 1024
流出量Egress 流出数据量。The amount of egress data. 此数字包括从外部客户端到 Azure 存储流出的数据量,以及流出 Azure 中的数据量。This number includes egress from an external client into Azure Storage as well as egress within Azure. 因此,此数字不反映计费的流出量。As a result, this number does not reflect billable egress.

单位:字节Unit: Bytes
聚合类型:总计Aggregation Type: Total
适用的维度:GeoType、ApiName 和 Authentication(定义Applicable dimensions: GeoType, ApiName, and Authentication (Definition)
值示例:1024Value example: 1024
SuccessServerLatencySuccessServerLatency Azure 存储处理成功请求所用的平均时间。The average time used to process a successful request by Azure Storage. 此值不包括 SuccessE2ELatency 中指定的网络延迟。This value does not include the network latency specified in SuccessE2ELatency.

单位:毫秒Unit: Milliseconds
聚合类型:平均值Aggregation Type: Average
适用的维度:GeoType、ApiName 和 Authentication(定义Applicable dimensions: GeoType, ApiName, and Authentication (Definition)
值示例:1024Value example: 1024
SuccessE2ELatencySuccessE2ELatency 向存储服务或指定的 API 操作发出的成功请求的平均端到端延迟。The average end-to-end latency of successful requests made to a storage service or the specified API operation. 此值包括在 Azure 存储中读取请求、发送响应和接收响应确认所需的处理时间。This value includes the required processing time within Azure Storage to read the request, send the response, and receive acknowledgment of the response.

单位:毫秒Unit: Milliseconds
聚合类型:平均值Aggregation Type: Average
适用的维度:GeoType、ApiName 和 Authentication(定义Applicable dimensions: GeoType, ApiName, and Authentication (Definition)
值示例:1024Value example: 1024
可用性Availability 存储服务或指定的 API 操作的可用性百分比。The percentage of availability for the storage service or the specified API operation. 可用性通过由“计费请求总数”值除以适用的请求数(包括引发意外错误的请求)计算得出。Availability is calculated by taking the total billable requests value and dividing it by the number of applicable requests, including those requests that produced unexpected errors. 所有意外错误都会导致存储服务或指定的 API 操作的可用性下降。All unexpected errors result in reduced availability for the storage service or the specified API operation.

单位:百分比Unit: Percent
聚合类型:平均值Aggregation Type: Average
适用的维度:GeoType、ApiName 和 Authentication(定义Applicable dimensions: GeoType, ApiName, and Authentication (Definition)
值示例:99.99Value example: 99.99

指标维度Metrics dimensions

Azure 存储支持对 Azure Monitor 中的指标使用以下维度。Azure Storage supports following dimensions for metrics in Azure Monitor.

维度名称Dimension Name 说明Description
BlobTypeBlobType 仅限 Blob 指标的 Blob 类型。The type of blob for Blob metrics only. 支持的值为 BlockBlobPageBlobAzure Data Lake StorageThe supported values are BlockBlob, PageBlob, and Azure Data Lake Storage. BlockBlob 中包含追加 Blob。Append Blob is included in BlockBlob.
BlobTierBlobTier Azure 存储提供了不同的访问层,允许以最具成本效益的方式存储 Blob 对象数据。Azure storage offers different access tiers, which allow you to store blob object data in the most cost-effective manner. 请在 Azure 存储 Blob 层中查看详细信息。See more in Azure Storage blob tier. 支持的值包括:The supported values include:
  • Hot:热层Hot: Hot tier
  • Cool:冷层Cool: Cool tier
  • 存档:存档层Archive: Archive tier
  • Premium:块 Blob 的高级层Premium: Premium tier for block blob
  • P4/P6/P10/P15/P20/P30/P40/P50/P60:高级页 Blob 的层类型P4/P6/P10/P15/P20/P30/P40/P50/P60: Tier types for premium page blob
  • 标准:标准页 Blob 的层类型Standard: Tier type for standard page Blob
  • Untiered:常规用途 v1 存储帐户的层类型Untiered: Tier type for general purpose v1 storage account
  • GeoTypeGeoType 来自主要或辅助群集的事务。Transaction from Primary or Secondary cluster. 可用值包括 PrimarySecondaryThe available values include Primary and Secondary. 从辅助租户读取对象时,该维度会应用到读取访问异地冗余存储 (RA-GRS)。It applies to Read Access Geo Redundant Storage(RA-GRS) when reading objects from secondary tenant.
    ResponseTypeResponseType 事务响应类型。Transaction response type. 可用的值包括:The available values include:
  • ClientOtherError:除描述的错误以外的其他所有客户端错误。ClientOtherError: All other client-side errors except described ones.
  • 成功:请求成功Success: Successful request
  • ApiNameApiName 操作的名称。The name of operation. 例如:For example:
  • CreateContainerCreateContainer
  • DeleteBlobDeleteBlob
  • GetBlobGetBlob
  • 有关所有操作名称,请参阅文档For all operation names, see document.
    身份验证Authentication 事务中所用的身份验证类型。Authentication type used in transactions. 可用的值包括:The available values include:
  • AccountKey:事务通过存储帐户密钥进行身份验证。AccountKey: The transaction is authenticated with storage account key.
  • SAS:事务通过共享访问签名进行身份验证。SAS: The transaction is authenticated with shared access signatures.
  • OAuth:事务通过 OAuth 访问令牌进行身份验证。OAuth: The transaction is authenticated with OAuth access tokens.
  • Anonymous:事务以匿名方式请求。Anonymous: The transaction is requested anonymously. 不包括预检请求。It doesn’t include preflight requests.
  • AnonymousPreflight:事务为预检请求。AnonymousPreflight: The transaction is preflight request.
  • 对于支持维度的指标,需要指定维度值才能查看相应的指标值。For the metrics supporting dimensions, you need to specify the dimension value to see the corresponding metrics values. 例如,如果查看成功响应的 Transactions 值,需要使用 Success 筛选 ResponseType 维度。For example, if you look at Transactions value for successful responses, you need to filter the ResponseType dimension with Success. 或者,如果查看块 Blob 的 BlobCount 值,需要使用 BlockBlob 筛选 BlobType 维度。Or if you look at BlobCount value for Block Blob, you need to filter the BlobType dimension with BlockBlob.

    旧指标的服务连续性Service continuity of legacy metrics

    旧指标可与 Azure Monitor 托管的指标一同使用。Legacy metrics are available in parallel with Azure Monitor managed metrics. 在 Azure 存储终止旧指标的服务之前,支持范围保持不变。The support keeps the same until Azure Storage ends the service on legacy metrics.

    常见问题FAQ

    新指标是否支持经典存储帐户?Does new metrics support Classic Storage account?

    否,Azure Monitor 中的新指标仅支持 Azure 资源管理器存储帐户。No, new metrics in Azure Monitor only support Azure Resource Manager storage accounts. 如果要使用存储帐户上的指标,则需要迁移到 Azure 资源管理器存储帐户。If you want to use metrics on Storage accounts, you need to migrate to Azure Resource Manager Storage account. 请参阅迁移到 Azure 资源管理器See Migrate to Azure Resource Manager.

    Azure 存储是否支持托管磁盘或非托管磁盘的指标?Does Azure Storage support metrics for Managed Disks or Unmanaged Disks?

    否,Azure 计算支持磁盘上的指标。No, Azure Compute supports the metrics on disks. 有关详细信息,请参阅此文章See article for more details.

    如何使用新指标映射和迁移经典指标?How to map and migrate classic metrics with new metrics?

    可以在 Azure 存储指标迁移中找到经典指标与新指标之间的详细映射。You can find detailed mapping between classic metrics and new metrics in Azure Storage metrics migration.

    后续步骤Next steps