使用用于存储的 Azure Monitor 监视存储服务Monitoring your storage service with Azure Monitor for Storage

用于存储的 Azure Monitor 通过提供 Azure 存储服务性能、容量和可用性的统一视图,提供对 Azure 存储帐户的全面监视。Azure Monitor for Storage provides comprehensive monitoring of your Azure Storage accounts by delivering a unified view of your Azure Storage services performance, capacity, and availability. 可以通过两种方式来观察存储容量和性能:直接在存储帐户中查看,或在 Azure Monitor 中跨存储帐户组查看。You can observe storage capacity, and performance in two ways, view directly from a storage account or view from Azure Monitor to see across groups of storage accounts.

本文有助于了解用于存储的 Azure Monitor 提供的体验,此体验不仅可便于大规模获得关于存储帐户的运行状况和性能的可操作见解,还可便于关注热点和诊断延迟、限制和可用性问题。This article will help you understand the experience Azure Monitor for Storage delivers to derive actionable knowledge on the health and performance of Storage accounts at scale, with a capability to focus on hotspots and diagnose latency, throttling, and availability issues.

用于存储的 Azure Monitor 简介Introduction to Azure Monitor for Storage

在深入了解此体验之前,你应该了解它如何呈现和可视化信息。Before diving into the experience, you should understand how it presents and visualizes information. 无论你是直接从存储帐户选择存储功能,还是从 Azure Monitor 中选择,用于存储的 Azure Monitor 都提供一致的体验。Whether you select the Storage feature directly from a storage account or from Azure Monitor, Azure Monitor for Storage presents a consistent experience.

它提供以下组合功能:Combined it delivers:

  • 大规模透视功能根据存储服务或 API 操作的运行状况显示可用性快照视图,利用率功能显示存储服务收到的请求总数,延迟功能显示存储服务或 API 操作类型处理请求的平均用时。At scale perspective showing a snapshot view of their availability based on the health of the storage service or the API operation, utilization showing total number of requests that the storage service receives, and latency showing the average time the storage service or API operation type is taking to process requests. 还可以按 blob、文件、表和队列查看容量。You can also view capacity by blob, file, table, and queue.

  • 对特定存储帐户进行向下钻取分析,以帮助诊断问题或按类别(即可用性、性能、故障和容量)进行详细分析。Drill down analysis of a particular storage account to help diagnose issues or perform detailed analysis by category - availability, performance, failures, and capacity. 选择这些选项中的任何一个都可以深入了解指标。Selecting any one of those options provides an in-depth view of metrics.

  • 可自定义,即可以更改要查看的指标、修改或设置与限制一致的阈值,并保存为你自己的工作簿。Customizable where you can change which metrics you want to see, modify or set thresholds that align with your limits, and save as your own workbook. 工作簿中的图表可以固定到 Azure 仪表板。Charts in the workbook can be pinned to Azure dashboard.

此功能不需要启用或配置任何设置,存储帐户的存储指标是默认收集的。This feature does not require you to enable or configure anything, the storage metrics from your storage accounts are collected by default.

备注

访问此功能不需任何费用。系统只会对你配置或启用的 Azure Monitor 基本功能收费,如 Azure Monitor 定价详细信息页中所述。There is no charge to access this feature and you will only be charged for the Azure Monitor essential features you configure or enable, as described on the Azure Monitor pricing details page.

备注

用于存储的 Azure Monitor 不支持常规用途 v1 帐户Azure Monitor for Storage does not support general-purpose v1 accounts.

在 Azure Monitor 中查看View from Azure Monitor

在 Azure Monitor 中,可以查看订阅中多个存储帐户的事务、延迟和容量详细信息,有助于发现性能、容量问题和故障。From Azure Monitor, you can view transaction, latency, and capacity details from multiple storage accounts in your subscription, and help identify performance, capacity problems, and failures.

若要查看所有订阅中的存储帐户的利用率和可用性,请按照以下步骤操作。To view the utilization and availability of your storage accounts across all of your subscriptions, perform the following steps.

  1. 登录 Azure 门户Sign in to the Azure portal.

  2. 依次选择 Azure 门户左侧窗格中的“Monitor”,以及“见解”部分下的“存储帐户”。Select Monitor from the left-hand pane in the Azure portal, and under the Insights section, select Storage Accounts.

    包含多个存储帐户的视图

“概述”工作簿Overview workbook

在所选订阅的“概述”工作簿中,表内显示订阅中分组的最多 5 个存储帐户的交互式存储指标和服务可用性状态。On the Overview workbook for the selected subscription, the table displays interactive storage metrics and service availability state for up to 5 storage accounts grouped within the subscription. 可以根据你从下面的下拉列表中选择的选项来筛选结果:You can filter the results based on the options you select from the following drop-down lists:

  • 订阅 - 只列出包含存储帐户的订阅。Subscriptions - only subscriptions that have storage accounts are listed.

  • 存储帐户 - 默认情况下,预先选择 5 个存储帐户。Storage Accounts - by default, 5 storage accounts are pre-selected. 如果你在范围选择器中选择所有或多个存储帐户,最多会返回 200 个存储帐户。If you select all or multiple storage accounts in the scope selector, up to 200 storage accounts will be returned. 例如,如果你选择的三个订阅共有 573 个存储帐户,那么只会显示 200 个帐户。For example, if you had a total of 573 storage accounts across three subscriptions that you've selected, only 200 accounts would be displayed.

  • 时间范围 - 默认情况下,系统会根据你所做的选择显示过去 4 小时的相应信息。Time Range - by default, displays the last 4 hours of information based on the corresponding selections made.

下拉列表下面的计数器磁贴汇总了订阅中的存储帐户总数,并反映了已选择的的存储帐户总数。The counter tile under the drop-down lists rolls-up the total number of storage accounts in the subscription and reflects how many of the total are selected. 工作簿中报告事务指标或错误的列有条件颜色编码或热度地图。There is conditional color-coding or heatmaps for columns in the workbook that report transaction metrics or errors. 最深的颜色具有最高值,较浅的颜色基于最低值。The deepest color has the highest value and a lighter color is based on the lowest values. 对于基于错误的列,值为红色;对于基于指标的列,值为蓝色。For the error-based columns, the value is in red and for the metric-based columns, the value is in blue.

选择“可用性”、“E2E 延迟”、“服务器延迟”和“事务错误类型/错误”列中的值会定向到针对特定类型存储指标量身定制的报告,这些指标与为相应存储帐户选择的列匹配。Select a value in the columns Availability, E2E Latency, Server Latency, and transaction error type/Errors directs you to a report tailored to the specific type of storage metrics that match the column selected for that storage account. 若要详细了解每个类别的工作簿,请参阅下面的详细存储工作簿部分。For more information about the workbooks for each category, see the Detailed storage workbooks section below.

默认“可用性”阈值为:The default Availability threshold is:

  • 警告 - 99%Warning - 99%
  • 严重 - 90%Critical - 90%

若要根据观察结果或要求设置可用性阈值,请查阅修改可用性阈值To set an availability threshold based on the results of your observation or requirements, review modify the availability threshold.

容量工作簿Capacity workbook

选择页面顶部的“容量”。此时,“容量”工作簿打开。Select Capacity at the top of the page and the Capacity workbook opens. 其中显示了帐户中使用的总存储容量,以及帐户中每个数据服务使用的容量,以帮助发现过度利用和未充分利用的存储。It shows you the amount of total storage used in the account and capacity used by each data service in the account to help identify over and under utilized storage.

多个存储帐户的“容量”工作簿

工作簿中使用蓝色值报告容量指标的列有条件颜色编码或热度地图。There is conditional color-coding or heatmaps for columns in the workbook that report capacity metrics with a blue value. 最深的颜色具有最高值,较浅的颜色基于最低值。The deepest color has the highest value and a lighter color is based on the lowest values.

选择工作簿中任何一列下的值都会向下钻取到相应存储帐户的“容量”工作簿。When you select a value under any one of the columns in the workbook, you drill down to the Capacity workbook for the storage account. 下面的详细存储工作簿部分介绍了关于向下钻取报告的更多详情。Further details about the drill-down report are described in the Detailed storage workbooks section below.

在存储帐户中查看View from a storage account

若要直接从存储帐户访问用于 VM 的 Azure Monitor,请执行以下操作:To access Azure Monitor for VMs directly from a storage account:

  1. 在 Azure 门户中,选择“存储帐户”。In the Azure portal, select Storage accounts.

  2. 从列表中选择一个存储帐户。From the list, choose a storage account. 在“监视”部分中,选择“见解”。In the Monitoring section, choose Insights.

    显示存储帐户“概述”工作簿页面的屏幕截图。

此存储帐户的“概述”工作簿中显示了多个存储性能指标,有助于你快速进行评估:On the Overview workbook for the storage account, it shows several storage performance metrics that help you quickly assess:

  • 存储服务的运行状况:可便于立即确定是否有超出你控制范围的问题正在影响部署区域中的存储服务,“摘要”列下对此进行了说明。Health of the Storage service to immediately see if an issue outside of your control is affecting the Storage service in the region it is deployed to, which is stated under the Summary column.

  • 交互式性能图:显示与存储容量、可用性、事务和延迟相关的最基本详细信息。Interactive performance charts showing the most essential details related to storage capacity, availability, transactions, and latency.

  • 指标和状态磁贴:突出显示了服务可用性、对存储服务执行的事务总数、E2E 延迟以及服务器延迟。Metric and status tiles highlighting service availability, total count of transactions to the storage service, E2E latency, and server latency.

选择“故障”、“性能”、“可用性”和“容量”按钮中的任何一个都会打开相应的工作簿。Selecting any one of buttons for Failures, Performance, Availability, and Capacity opens the respective workbook.

所选存储帐户的“概述”页

详细存储工作簿Detailed storage workbooks

无论是从多个存储帐户的“概述”工作簿中选择“可用性”、“E2 延迟”、“服务延迟”和“事务错误类型/错误”列中的值,还是从特定存储帐户的“概述” 工作簿中选择“故障”、“性能”“可用性”和“容量”按钮中的任何一个,都会获得一组针对相应类别量身定制的交互式存储相关信息。Whether you selected a value in the columns Availability, E2E Latency, Server Latency, and transaction error type/Errors from the multiple storage account Overview workbook, or selecting any one of buttons for Failures, Performance, Availability, and Capacity from the Overview workbook from a specific storage account, each deliver a set of interactive storage-related information tailored to that category.

  • 单击“可用性”打开“可用性”工作簿。Availability opens the Availability workbook. 其中显示了 Azure 存储服务的当前运行状况状态,并包含显示按存储帐户中定义的数据服务进行分类的每个对象的运行状况状态的表(包含表示所选时间范围的趋势线),以及帐户中每个数据服务的可用性趋势图。It shows the current health state of Azure Storage service, a table showing the available health state of each object categorized by data service defined in the storage account with a trend line representing the time range selected, and an availability trend chart for each data service in the account.

    “可用性”报告示例

  • 单击“E2E 延迟”和“服务器延迟”打开“性能”工作簿。E2E Latency and Server Latency opens the Performance workbook. 其中包括显示 E2E 延迟和服务器延迟的汇总状态磁贴、E2E 延迟与服务器延迟的性能图,以及按存储帐户中定义的数据服务进行分类的 API 对成功调用的延迟进行细分的表。It includes a rollup status tile showing E2E latency and server latency, a performance chart of E2E versus server latency, and a table breaking down latency of successful calls by API categorized by data service defined in the storage account.

    “性能”报告示例

  • 选择网格中列出的任何错误类别都会打开“故障”工作簿。Selecting any of the error categories listed in the grid open the Failure workbook. 此报告显示其他所有客户端错误的指标磁贴(已描述的错误和成功请求除外)、客户端限制错误、特定于 ClientOtherError 属性的事务“响应类型”维度指标的性能图,以及“事务数(按 API 名称)”和“事务数(按响应类型)”这两个表。The report shows metric tiles of all other client-side errors except described ones and successful requests, client-throttling errors, a performance chart for the transaction Response Type dimension metric specific to ClientOtherError attribute, and two tables - Transactions by API name and Transactions by Response type.

    “故障”报告示例

  • 单击“容量”打开“容量”工作簿。Capacity opens the Capacity workbook. 它在磁贴和图表中显示帐户中的每个存储数据对象使用的存储总量,以及帐户中存储了多少个数据对象。It shows the total amount of storage used for each storage data object in the account in the tiles and the chart, and how many data objects are stored in the account.

    所选存储帐户的“容量”页

固定和导出Pin and export

可以将任何一个指标部分固定到 Azure 仪表板,具体方法是选择相应部分右上角的图钉图标。You can pin any one of the metric sections to an Azure Dashboard by selecting the pushpin icon at the top right of the section.

仪表板指标部分的图钉示例

多订阅和存储帐户的“概述”或“容量”工作簿支持通过选择图钉图标右侧的向下箭头图标来导出 Excel 格式的结果。The multi-subscription and storage account Overview or Capacity workbooks support exporting the results in Excel format by selecting the down arrow icon to the right of the pushpin icon.

导出工作簿网格结果示例

自定义用于存储的 Azure MonitorCustomize Azure Monitor for Storage

此部分重点介绍了编辑工作簿的常见方案,以进行自定义来满足数据分析需求:This section highlights common scenarios for editing the workbook to customize in support of your data analytics needs:

  • 限定工作簿的范围,以始终选择特定的一个或多个订阅或存储帐户Scope the workbook to always select a particular subscription or storage account(s)
  • 更改网格中的指标Change metrics in the grid
  • 更改可用性阈值Change the availability threshold
  • 更改颜色呈现Change the color rendering

自定义项会保存到自定义工作簿,以防覆盖已发布工作簿中的默认配置。The customizations are saved to a custom workbook to prevent overwriting the default configuration in our published workbook. 无论是在私有的“我的报表”部分中,还是在有权访问资源组的每个人均可访问的“共享报表”部分中,工作簿都保存在某个资源组中。Workbooks are saved within a resource group, either in the My Reports section that's private to you or in the Shared Reports section that's accessible to everyone with access to the resource group. 保存自定义工作簿后,需要转到工作簿库来启动它。After you save the custom workbook, you need to go to the workbook gallery to launch it.

从命令栏启动工作簿库

指定订阅或存储帐户Specifying a subscription or storage account

可以配置多订阅和存储帐户的“概述”或“容量”工作簿,以将每次运行时的范围限定为特定的一个或多个订阅或存储帐户。请按照以下步骤操作。You can configure the multi-subscription and storage account Overview or Capacity workbooks to scope to a particular subscription(s) or storage account(s) on every run, perform the following steps.

  1. 依次选择门户中的“Monitor”,以及左侧窗格中的“存储帐户”。Select Monitor from the portal and then select Storage Accounts from the left-hand pane.

  2. 在“概述”工作簿上,选择命令栏中的“编辑”。On the Overview workbook, from the command bar select Edit.

  3. 在“订阅”下拉列表中,选择一个或多个要默认选择的订阅。Select from the Subscriptions drop-down list one or more subscriptions you want it to default to. 请注意,工作簿最多支持共选择 10 个订阅。Remember, the workbook supports selecting up to a total of 10 subscriptions.

  4. 在“存储帐户”下拉列表中,选择一个或多个要默认选择的帐户。Select from the Storage Accounts drop-down list one or more accounts you want it to default to. 请注意,工作簿最多支持共选择 200 个存储帐户。Remember, the workbook supports selecting up to a total of 200 storage accounts.

  5. 选择命令栏中的“另存为”,以保存包含自定义项的工作簿副本,然后单击“完成编辑”返回到阅读模式。Select Save as from the command bar to save a copy of the workbook with your customizations, and then click Done editing to return to reading mode.

修改工作簿中的指标和颜色Modify metrics and colors in the workbook

预生成工作簿包含指标数据,你可以修改或删除任何一个可视化效果,并根据团队的特定需求进行自定义。The prebuilt workbooks contain metric data and you have the ability to modify or remove any one of the visualizations and customize to your team's specific needs.

我们的示例使用多订阅和存储帐户的“容量”工作簿来展示如何执行以下操作:In our example, we are working with the multi-subscription and storage account capacity workbook, to demonstrate how to:

  • 删除指标Remove a metric
  • 更改颜色呈现Change color rendering

可以对任何一个预生成“故障”、“性能”、“可用性”和“容量”工作簿执行相同的更改。You can perform the same changes against any one of the prebuilt Failures, Performance, Availability, and Capacity workbooks.

  1. 依次选择门户中的“Monitor”,以及左侧窗格中的“存储帐户”。Select Monitor from the portal and then select Storage Accounts from the left-hand pane.

  2. 选择“容量”以切换到“容量”工作簿,然后选择命令栏中的“编辑”。Select Capacity to switch to the capacity workbook and from the command bar, select Edit from the command bar.

    选择“编辑”来修改工作簿

  3. 选择“指标”部分旁边的“编辑”。Next to the metrics section, select Edit.

    选择“编辑”来修改“容量”工作簿指标

  4. 我们将删除“帐户使用容量时间线”列。因此,请选择“指标”网格中“列设置”。We are going to remove the Account used capacity timeline column, so select Column Settings in the metrics grid.

    编辑列设置

  5. 在“编辑列设置”窗格中,选择“列”部分下的“microsoft.storage/storageaccounts-Capacity-UsedCapacity Timeline$|Account used capacity Timeline$”,然后在“列呈现器”下拉列表下选择“隐藏”。In the Edit column settings pane, select under the Columns section microsoft.storage/storageaccounts-Capacity-UsedCapacity Timeline$|Account used capacity Timeline$, and under the drop-down list Column renderer select Hidden.

  6. 选择“保存并关闭”,以提交更改。Select Save and close to commit your change.

现在,让我们将报告中的容量指标的颜色主题更改为使用绿色(而不是蓝色)。Now let's change the color theme for the capacity metrics in the report to use green instead of blue.

  1. 选择“指标”网格中的“列设置”。Select Column Settings in the metrics grid.

  2. 在“编辑列设置”窗格中,选择“列”部分下的“microsoft.storage/storageaccounts-Capacity-UsedCapacity$|microsoft.storage/storageaccounts/blobservices-Capacity-BlobCapacity$|microsoft.storage/storageaccounts/fileservices-Capacity-FileCapacity$|microsoft.storage/storageaccounts/queueservices-Capacity-QueueCapacity$|microsoft.storage/storageaccounts/tableservices-Capacity-TableCapacity$” 。In the Edit column settings pane, select under the Columns section microsoft.storage/storageaccounts-Capacity-UsedCapacity$|microsoft.storage/storageaccounts/blobservices-Capacity-BlobCapacity$|microsoft.storage/storageaccounts/fileservices-Capacity-FileCapacity$|microsoft.storage/storageaccounts/queueservices-Capacity-QueueCapacity$|microsoft.storage/storageaccounts/tableservices-Capacity-TableCapacity$. 在“调色板”下拉列表下,选择“绿色”。Under the drop-down list Color palette, select Green.

  3. 选择“保存并关闭”,以提交更改。Select Save and close to commit your change.

  4. 选择命令栏中的“另存为”,以保存包含自定义项的工作簿副本,然后单击“完成编辑”返回到阅读模式。Select Save as from the command bar to save a copy of the workbook with your customizations, and then click Done editing to return to reading mode.

修改可用性阈值Modify the availability threshold

此示例使用存储帐户“容量”工作簿来展示如何修改可用性阈值。In this example, we are working with the storage account capacity workbook and demonstrating how to modify the availability threshold. 默认情况下,为磁贴和网格报告的可用性百分比配置的最小阈值为 90,最大阈值为 99。By default, the tile and grid reporting percent availability are configured with a minimum threshold of 90 and maximum threshold of 99. 我们将把“可用性(按 API 名称)”网格中的“可用性(%)”的最小阈值更改为“85%”;也就是说,如果阈值小于 85%,则运行状况状态更改为“严重”。We are going to change the minimum threshold value of the Availability % in the Availability by API name grid to 85%, which means the health state changes to critical if the threshold is less than 85 percent.

  1. 在门户中选择“存储帐户”,然后从列表中选择一个存储帐户。Select Storage accounts from the portal and then select a storage account from the list.

  2. 在左侧窗格中,选择“见解”。Select Insights from the left-hand pane.

  3. 在工作簿中,选择“可用性”以切换到“可用性”工作簿,然后选择命令栏中的“编辑”。In the workbook, select Availability to switch to the availability workbook, and then select Edit from the command bar.

  4. 向下滚动到页面底部,在左侧“可用性(按 API 名称)”网格旁边,选择“编辑”。Scroll down to the bottom of the page and on the left-hand side next to the Availability by API grid, select Edit.

    编辑“可用性(按 API 名称)”网格设置

  5. 选择“列设置”,然后在“编辑列设置”窗格的“列”部分下,选择“可用性(%)(阈值 + 格式化)”。Select Column settings and then in the Edit column settings pane, under the Columns section select Availability (%) (Thresholds + Formatted).

  6. 将“严重”运行状况状态的值从“90”更改为“85”,然后单击“保存并关闭”。Change the value for the Critical health state from 90 to 85 and then click Save and Close.

    修改“严重”状态的可用性阈值

  7. 选择命令栏中的“另存为”,以保存包含自定义项的工作簿副本,然后单击“完成编辑”返回到阅读模式。Select Save as from the command bar to save a copy of the workbook with your customizations, and then click Done editing to return to reading mode.

故障排除Troubleshooting

如需常规故障排除指南,请参阅专用的基于工作簿的见解故障排除文章For general troubleshooting guidance, refer to the dedicated workbook-based insights troubleshooting article.

此部分有助于诊断和排查在使用用于存储的 Azure Monitor 时可能会遇到的一些常见问题。This section will help you with the diagnosis and troubleshooting of some of the common issues you may encounter when using Azure Monitor for Storage. 使用下面的列表来查找与具体问题相关的信息。Use the list below to locate the information relevant to your specific issue.

解决性能、容量或可用性问题Resolving performance, capacity, or availability issues

若要获取帮助来排查在使用用于存储的 Azure Monitor 时遇到的任何存储相关问题,请参阅 Azure 存储故障排除指南To help troubleshoot any storage-related issues you identify with Azure Monitor for Storage, see the Azure Storage troubleshooting guidance.

为什么我只能看到 200 个存储帐户?Why can I only see 200 storage accounts?

无论选择多少个订阅,所选存储帐户的数目都不能超过 200 个。The number of selected storage accounts has a limit of 200, regardless of the number of subscriptions that are selected.

如何更改可用性着色和阈值?How to change the coloring and threshold for availability?

有关如何更改可用性着色和阈值的详细步骤,请参阅修改可用性阈值部分。Refer to the Modify the availability threshold section for the detailed steps on how to change the coloring and thresholds for availability.

如何对用于存储的 Azure Monitor 中显示的数据进行分析和故障排除?How to analyze and troubleshoot the data shown in Azure Monitor for Storage?

若要详细了解如何分析用于存储的 Azure Monitor 中显示的 Azure 存储数据并对其进行故障排除,请参阅监视、诊断和排查 Azure 存储故障一文。Refer to the Monitor, diagnose, and troubleshoot Azure Storage article for details on how to analyze and troubleshoot the Azure Storage data shown in Azure Monitor for Storage.

为什么我在指标中看不到所有类型的错误?Why don’t I see all the types of errors in metrics?

目前,最多显示三种不同类型的错误,其余错误都一起分组到一个桶中。Currently, up to three different types of errors are shown and the rest of the errors are grouped together in a single bucket. 它是使用 splitByLimit 控制的,可以进行修改。It is controlled using splitByLimit and can be modified. 若要更改此属性,请执行以下操作:For changing this property:

  1. 单击“编辑工作簿”。Click on edit workbook.

  2. 转到“指标”,单击“编辑”,然后选择“事务数总和”或要编辑的任何指标。Go to metrics, click on edit and then select Transactions, Sum or whatever metrics you want to edit.

    转到“指标”,然后依次单击“编辑”和“事务数总和”

  3. 然后,更改“拆分数”。Then change the Number of Splits.

    选择指标参数

若要查看 n 种不同类型的错误,请将 splitByLimit 指定为 n+1(额外的 1 表示其余错误)。If you want to see n different types of error than specify splitByLimit as n+1, 1 extra for rest of the errors.

我在某个存储帐户上保存了工作簿。I saved my workbook while on some Storage Account. 为什么现在找不到?Why can’t I find it now?

每个工作簿都保存在保存它的存储帐户中。Each workbook is saved in the storage account that you saved it in. 请尝试查找用户在其中保存了工作簿的特定存储帐户。Try to find the specific Storage Account in which the user saved the workbook. 否则,如果不知道资源(存储帐户),就无法找到特定的工作簿。Otherwise, there is no way to find a specific workbook without knowing the resource (storage account).

后续步骤Next steps