存储分析Storage Analytics

Azure 存储分析执行日志记录并为存储帐户提供度量值数据。Azure Storage Analytics performs logging and provides metrics data for a storage account. 可以使用此数据为存储帐户跟踪请求、分析使用趋势和诊断问题。You can use this data to trace requests, analyze usage trends, and diagnose issues with your storage account.

若要使用存储分析,必须为每个要监视的服务单独启用它。To use Storage Analytics, you must enable it individually for each service you want to monitor. 可以从 Azure 门户中启用它。You can enable it from the Azure portal. 有关详细信息,请参阅在 Azure 门户中监视存储帐户For details, see Monitor a storage account in the Azure portal. 还可以通过 REST API 或客户端库以编程方式启用存储分析。You can also enable Storage Analytics programmatically via the REST API or the client library. 使用设置 Blob 服务属性设置队列服务属性设置表服务属性设置文件服务属性操作,为每个服务启用存储分析。Use the Set Blob Service Properties, Set Queue Service Properties, Set Table Service Properties, and Set File Service Properties operations to enable Storage Analytics for each service.

聚合数据存储在众所周知的 Blob(用于日志记录)和众所周知的表(用于度量)中,可以使用 BLOB 服务和表服务 API 对其进行访问。The aggregated data is stored in a well-known blob (for logging) and in well-known tables (for metrics), which may be accessed using the Blob service and Table service APIs.

存储分析针对存储的数据量实施 20 TB 的限制,这与存储帐户的总限制无关。Storage Analytics has a 20 TB limit on the amount of stored data that is independent of the total limit for your storage account. 有关存储帐户限制的详细信息,请参阅标准存储帐户的可伸缩性和性能目标For more information about storage account limits, see Scalability and performance targets for standard storage accounts.

有关使用存储分析及其他工具来识别、诊断和排查 Azure 存储相关问题的深入指导,请参阅监视、诊断和排查 Azure 存储问题For an in-depth guide on using Storage Analytics and other tools to identify, diagnose, and troubleshoot Azure Storage-related issues, see Monitor, diagnose, and troubleshoot Azure Storage.

存储分析计费Billing for Storage Analytics

所有度量数据是由存储帐户服务写入的。All metrics data is written by the services of a storage account. 因此,存储分析执行的每个写入操作都是计费的。As a result, each write operation performed by Storage Analytics is billable. 此外,度量数据使用的存储量也是计费的。Additionally, the amount of storage used by metrics data is also billable.

存储分析执行的以下操作都是计费的:The following actions performed by Storage Analytics are billable:

  • 为日志记录创建 Blob 的请求。Requests to create blobs for logging.
  • 为度量创建表实体的请求。Requests to create table entities for metrics.

如果配置了数据保留策略,在存储分析删除以前的日志记录和度量数据时,不会对删除事务进行收费。If you have configured a data retention policy, you are not charged for delete transactions when Storage Analytics deletes old logging and metrics data. 不过,从客户端中删除事务是计费的。However, delete transactions from a client are billable. 有关保留策略的详细信息,请参阅设置存储分析数据保留策略For more information about retention policies, see Setting a Storage Analytics Data Retention Policy.

了解计费请求Understanding billable requests

向帐户的存储服务发出的每个请求是应计费或不计费的。Every request made to an account's storage service is either billable or non-billable. 存储分析记录向服务发出的每个请求,包括指示如何处理请求的状态消息。Storage Analytics logs each individual request made to a service, including a status message that indicates how the request was handled. 同样,存储分析存储服务及其 API 操作的度量数据,包括某些状态消息的百分比和计数。Similarly, Storage Analytics stores metrics for both a service and the API operations of that service, including the percentages and count of certain status messages. 总之,这些功能可以帮助分析计费请求,对应用程序进行改进,以及诊断向服务发出的请求的问题。Together, these features can help you analyze your billable requests, make improvements on your application, and diagnose issues with requests to your services. 有关计费的详细信息,请参阅 Understanding Azure Storage Billing - Bandwidth, Transactions, and Capacity(了解 Azure 存储计费 - 带宽、事务和容量)。For more information about billing, see Understanding Azure Storage Billing - Bandwidth, Transactions, and Capacity.

查看存储分析数据时,可以使用存储分析记录的操作和状态消息主题中的表来确定计费的请求。When looking at Storage Analytics data, you can use the tables in the Storage Analytics Logged Operations and Status Messages topic to determine what requests are billable. 然后,可以将日志和指标数据与状态消息进行比较,以查看是否对你的特定请求进行收费。Then you can compare your logs and metrics data to the status messages to see if you were charged for a particular request. 也可以使用前述主题中的表来调查存储服务或各个 API 操作的可用性。You can also use the tables in the previous topic to investigate availability for a storage service or individual API operation.

后续步骤Next steps