Azure 指标资源管理器入门Getting started with Azure Metrics Explorer

从哪里开始Where do I start

Azure Monitor 指标资源管理器是 Azure 门户的一个组件,通过它可以绘制图表、以直观的形式关联趋势及研究指标值的上升和下降。Azure Monitor metrics explorer is a component of the Azure portal that allows plotting charts, visually correlating trends, and investigating spikes and dips in metrics' values. 使用指标资源管理器调查资源的运行状况和利用率。Use the metrics explorer to investigate the health and utilization of your resources. 请按以下顺序开始:Start in the following order:

  1. 选取资源和指标并查看基本图表。Pick a resource and a metric and you see a basic chart. 然后选择与调查相关的时间范围Then select a time range that is relevant for your investigation.

  2. 尝试应用维度筛选器和拆分Try applying dimension filters and splitting. 使用筛选器和拆分可以分析哪些指标段影响了整体指标值,以及识别可能的离群值。The filters and splitting allow you to analyze which segments of the metric contribute to the overall metric value and identify possible outliers.

  3. 在将图表固定到仪表板之前使用高级设置对其进行自定义。Use advanced settings to customize the chart before pinning to dashboards. 配置警报,以便在指标值超过阈值或降到阈值以下时收到通知。Configure alerts to receive notifications when the metric value exceeds or drops below a threshold.

创建第一个指标图表Create your first metric chart

若要在资源、资源组、订阅或 Azure Monitor 视图中创建指标图表,请打开“指标”选项卡并执行以下步骤: To create a metric chart, from your resource, resource group, subscription, or Azure Monitor view, open the Metrics tab and follow these steps:

  1. 单击“选择范围”按钮以打开资源范围选取器。Click on the "Select a scope" button to open the resource scope picker. 这将允许你选择要查看其指标的资源。This will allow you to select the resource(s) you want to see metrics for. 如果从资源的菜单中打开了指标资源管理器,则该资源应已填充完毕。The resource should already be populated if you opened metrics explorer from the resource's menu.


  2. 对于某些资源,必须选取一个命名空间。For some resources, you must pick a namespace. 命名空间只是一种为了轻松查找指标而组织指标的方式。The namespace is just a way to organize metrics so that you can easily find them. 例如,存储帐户具有单独的命名空间,用于存储文件、表、Blob 和队列指标。For example, storage accounts have separate namespaces for storing Files, Tables, Blobs, and Queues metrics. 许多资源类型只有一个命名空间。Many resource types only have one namespace.

  3. 从可用指标列表中选择一个指标。Select a metric from a list of available metrics.


  4. (可选)可以更改指标聚合Optionally, you can change the metric aggregation. 例如,你可能希望图表显示指标的最小值、最大值或平均值。For example, you might want your chart to show minimum, maximum, or average values of the metric.


如果要查看在同一图表中绘制的多个指标,请使用“添加指标”按钮,并重复这些步骤 。Use the Add metric button and repeat these steps if you want to see multiple metrics plotted in the same chart. 若要在一个视图中添加多个图表,请选择顶部的“添加图表”按钮。 For multiple charts in one view, select the Add chart button on top.

选择时间范围Select a time range


Azure 中的大多数指标将存储 93 天Most metrics in Azure are stored for 93 days. 但是,在任何单个图表中,可以查询不超过 30 天的数据。However, you can query no more than 30 days worth of data on any single chart. 可以平移图表以查看完整的保留期。You can pan the chart to view the full retention. 30 天限制不适用于基于日志的指标The 30 day limitation doesn't apply to log-based metrics.

默认情况下,图表显示最近 24 小时内的指标数据。By default, the chart shows the most recent 24 hours of metrics data. 使用“时间选取器”面板可更改时间范围,以及放大或缩小图表。 Use the time picker panel to change the time range, zoom in, or zoom out on your chart.



使用 时间画笔 调查图表中感兴趣的区域(高峰或低谷)。Use the time brush to investigate an interesting area of the chart (spike or a dip). 将鼠标指针放在区域的开始处,单击并按住鼠标左键,拖动到区域的另一侧,然后松开按钮。Put the mouse pointer at the beginning of the area, click and hold the left mouse button, drag to the other side of area and then release the button. 图表将在该时间范围内放大。The chart will zoom in on that time range.

应用维度筛选器和拆分Apply dimension filters and splitting

筛选拆分是用于处理包含维度的指标的强大诊断工具。Filtering and splitting are powerful diagnostic tools for the metrics that have dimensions. 这些功能会显示各种指标段(“维度值”)如何影响指标的整体值,并让你识别可能的离群值。These features show how various metric segments ("dimension values") impact the overall value of the metric, and allow you to identify possible outliers.

  • 通过 筛选 可以选择要包含在图表中的维度值。Filtering lets you choose which dimension values are included in the chart. 例如,在绘制“服务器响应时间”指标的图表时,你可能想要成功的请求。 For example, you might want to show successful requests when charting the server response time metric. 需要对“请求成功”维度应用筛选器。 You would need to apply the filter on the success of request dimension.

  • 拆分 可以控制图表是针对维度的每个值显示单独行,还是将值聚合为一行。Splitting controls whether the chart displays separate lines for each value of a dimension, or aggregates the values into a single line. 例如,可以在一行中查看所有服务器实例的平均响应时间,也可以在不同的行中查看每台服务器的此项指标。For example, you can see one line for an average response time across all server instances, or see separate lines for each server. 需要对“服务器实例”维度应用拆分才能查看单独的行。 You would need to apply splitting on the server instance dimension to see separate lines.

请参阅应用了筛选和拆分的图表示例See examples of the charts that have filtering and splitting applied. 本文介绍了用于配置图表的步骤。The article shows the steps were used to configure the charts.

共享指标图表Share your metric chart

目前有一种共享指标图表的方式。There are currently one way to share your metric chart. 下面是有关如何通过 Excel 共享指标图表中信息的说明。Below are the instructions on how to share information from your metrics charts through Excel.

下载到 ExcelDownload to Excel

单击“共享”,然后选择“下载到 Excel”。Click "Share" and select "Download to Excel". 下载会立即开始。Your download should start immediately.

介绍如何通过 Excel 共享指标图表的屏幕截图

高级图表设置Advanced chart settings

可以自定义图表样式和标题并修改高级图表设置。You can customize chart style, title, and modify advanced chart settings. 完成自定义后,将其固定到仪表板以保存工作。When done with customization, pin it to a dashboard to save your work. 你还可以配置指标警报。You can also configure metrics alerts. 请参阅产品文档来了解 Azure Monitor 指标资源管理器的上述功能和其他高级功能。Follow product documentation to learn about these and other advanced features of Azure Monitor metrics explorer.

后续步骤Next steps