Azure Monitor 工作簿Azure Monitor Workbooks

工作簿提供了一块灵活的画布,以用于分析数据以及在 Azure 门户中创建丰富的视觉报告。Workbooks provide a flexible canvas for data analysis and the creation of rich visual reports within the Azure portal. 使用工作簿可以在整个 Azure 中接入多个数据源,并将其组合成统一的交互式体验。They allow you to tap into multiple data sources from across Azure, and combine them into unified interactive experiences.

数据源Data sources

工作簿可以查询 Azure 中多个源的数据。Workbooks can query data from multiple sources within Azure. 工作簿的作者可以转换此数据,以提供对底层组件的可用性、性能、使用情况和总体运行状况的见解。Authors of workbooks can transform this data to provide insights into the availability, performance, usage, and overall health of the underlying components. 例如,分析虚拟机的性能日志可以识别 CPU 使用率较高或内存使用量较低的实例,并在交互式报告中以网格形式显示结果。For instance, analyzing performance logs from virtual machines to identify high CPU or low memory instances and displaying the results as a grid in an interactive report.

但是,工作簿的真正强大之处是能够将来自不同源的数据组合到一份报告中。But the real power of workbooks is the ability to combine data from disparate sources within a single report. 这样,便可以创建复合资源视图或者在不同的资源之间进行联接,以提供更丰富的数据和见解,除此之外别无他法。This allows for the creation of composite resource views or joins across resources enabling richer data and insights that would otherwise be impossible.

工作簿目前与以下数据源兼容:Workbooks are currently compatible with the following data sources:


工作簿提供了一组丰富的功能以用于将数据可视化。Workbooks provide a rich set of capabilities for visualizing your data. 有关每种可视化类型的详细示例,可以参阅下面的链接:For detailed examples of each visualization type, you can consult the links below:


固定可视化效果Pinning Visualizations

当工作簿处于固定模式,或者工作簿作者已启用显示图钉图标的设置时,可以使用工作簿中的文本、查询和指标步骤上的图钉按钮,来固定这些项。Text, query, and metrics steps in a workbook can be pinned by using the pin button on those items while the workbook is in pin mode, or if the workbook author has enabled settings for that element to make the pin icon visible.

若要访问固定模式,请单击“编辑”进入编辑模式,然后选择顶部栏中的蓝色图钉图标。To access pin mode, click Edit to enter editing mode, and select the blue pin icon in the top bar. 然后,单个图钉图标将显示在屏幕右侧的每个对应工作簿部分的“编辑”框的上方。An individual pin icon will then appear above each corresponding workbook part's Edit box on the right-hand side of your screen.



固定时会保存工作簿的状态。如果修改基础工作簿,仪表板上固定的工作簿不会更新。The state of the workbook is saved at the time of the pin, and pinned workbooks on a dashboard will not update if the underlying workbook is modified. 若要更新固定的工作簿部分,需要删除该部分,然后将其重新固定。In order to update a pinned workbook part, you will need to delete and re-pin that part.

入门Getting started

若要探索工作簿体验,请先导航到 Azure Monitor 服务。To explore the workbooks experience, first navigate to the Azure Monitor service. 为此,可以在 Azure 门户的搜索框中键入 MonitorThis can be done by typing Monitor into the search box in the Azure portal.

然后选择“工作簿”。Then select Workbooks.


通过库,可以方便地组织、排序和管理所有类型的工作簿。The gallery makes it convenient to organize, sort, and manage workbooks of all types.


库中有四个选项卡,可帮助组织工作簿类型。There are four tabs in the gallery to help organize workbook types.

选项卡Tab 说明Description
全部All 显示每种类型的前四个项目 - 工作簿、公共模板和我的模板。Shows the top four items for each type - workbooks, public templates, and my templates. 工作簿按修改日期排序,因此你将看到最近修改的八个工作簿。Workbooks are sorted by modified date so you will see the most recent eight modified workbooks.
工作簿Workbooks 显示你创建的或与你共享的所有可用工作簿的列表。Shows the list of all the available workbooks that you created or are shared with you.
公共模板Public Templates 显示由 Microsoft 发布的所有可用的入门功能性工作簿模板的列表。Shows the list of all the available ready to use, get started functional workbook templates published by Microsoft. 按类别分组。Grouped by category.
我的模板My Templates 显示你创建的或与你共享的所有可用的已部署工作簿模板的列表。Shows the list of all the available deployed workbook templates that you created or are shared with you. 按类别分组。Grouped by category.


  • 在每个选项卡中,都有一个包含工作簿信息的网格。In each tab, there is a grid with info on the workbooks. 其中包括说明、上次修改日期、标记、订阅、资源组、区域和共享状态。It includes description, last modified date, tags, subscription, resource group, region, and shared state. 还可以通过此信息对工作簿进行排序。You can also sort the workbooks by this information.
  • 按资源组、订阅、工作簿/模板名称或模板类别进行筛选。Filter by resource group, subscriptions, workbook/template name, or template category.
  • 选择要删除或批量删除的多个工作簿。Select multiple workbooks to delete or bulk delete.
  • 每个工作簿都有一个上下文菜单(省略号/结尾处三个点),选择它将打开一个快速操作列表。Each Workbook has a context menu (ellipsis/three dots at the end), selecting it will open a list of quick actions.
    • 查看资源 - 访问“工作簿资源”选项卡以查看工作簿的资源 ID、添加标记、管理锁等。View resource - Access workbook resource tab to see the resource ID of the workbook, add tags, manage locks etc.
    • 删除或重命名工作簿。Delete or rename workbook.
    • 将工作簿固定到仪表板。Pin workbook to dashboard.

工作簿与工作簿模板Workbooks versus workbook templates

可以看到一个绿色的工作簿,以及多个紫色的工作簿模板。 You can see a workbook in green and a number of workbook templates in purple. 模板充当特选的报告,可供多个用户和团队灵活重复使用。Templates serve as curated reports that are designed for flexible reuse by multiple users and teams. 打开某个模板会创建一个临时工作簿,其中填充了该模板的内容。Opening a template creates a transient workbook populated with the content of the template.

可以调整基于模板的工作簿的参数并执行分析,而无需担心将来会影响同事的报告体验。You can adjust the template-based workbook's parameters and perform analysis without fear of breaking the future reporting experience for colleagues. 如果打开某个模板,进行一些调整,然后选择“保存”图标,此时会将该模板保存为工作簿,该工作簿将以绿色显示,而原始模板保持不变。If you open a template, make some adjustments, and then select the save icon you will be saving the template as a workbook which would then show in green leaving the original template untouched.

在幕后,模板也与保存的工作簿不同。Under the hood, templates also differ from saved workbooks. 保存工作簿会创建关联的 Azure 资源管理器资源,而在打开模板时创建的临时工作簿则没有关联的唯一资源。Saving a workbook creates an associated Azure Resource Manager resource, whereas the transient workbook created when just opening a template has no unique resource associated with it. 若要详细了解如何在工作簿中管理访问控制,请参阅工作簿访问控制一文。To learn more about how access control is managed in workbooks consult the workbooks access control article.

探索工作簿模板Exploring a workbook template

选择“应用程序故障分析”以查看默认应用程序工作簿模板之一。Select Application Failure Analysis to see one of the default application workbook templates.


如前文所述,打开模板会创建一个可让你与之交互的临时工作簿。As stated previously, opening the template creates a temporary workbook for you to be able to interact with. 默认情况下,该工作簿以读取模式打开,在此模式下,只会显示原始模板作者按其目标所创建的分析体验的信息。By default, the workbook opens in reading mode which displays only the information for the intended analysis experience that was created by the original template author.

对于此特定工作簿,体验是交互式的。In the case of this particular workbook, the experience is interactive. 可以调整订阅、目标应用,以及要显示的数据的时间范围。You can adjust the subscription, targeted apps, and the time range of the data you want to display. 做出这些选择后,“HTTP 请求”的网格也是交互式的,选择单个行会更改要在报告底部的两个图表中呈现的数据。Once you have made those selections the grid of HTTP Requests is also interactive whereby selecting an individual row will change what data is rendered in the two charts at the bottom of the report.

编辑模式Editing mode

若要了解此工作簿模板的构成,需要选择“编辑”切换到编辑模式。To understand how this workbook template is put together you need to swap to editing mode by selecting Edit.


切换到编辑模式后,你会发现右侧显示了一些“编辑”框,它们对应于工作簿的每个方面。Once you have switched to editing mode you will notice a number of Edit boxes appear to the right corresponding with each individual aspect of your workbook.


如果选择紧靠在请求数据网格下面的编辑按钮,可以看到此工作簿部分包含一个 Kusto 查询,该查询针对的是 Application Insights 资源中的数据。If we select the edit button immediately under the grid of request data we can see that this part of our workbook consists of a Kusto query against data from an Application Insights resource.

基础 Kusto 查询的屏幕截图。

选择右侧的其他“编辑”按钮会显示一些构成了工作簿的核心组件,例如基于 Markdown 的文本框参数选择 UI 元素,以及其他图表/可视化类型Selecting the other Edit buttons on the right will reveal a number of the core components that make up workbooks like markdown-based text boxes, parameter selection UI elements, and other chart/visualization types.

在编辑模式下探索预生成的模板,然后根据需要对其进行修改并保存自己的自定义工作簿,是开始了解 Azure Monitor 工作簿功能的极佳方式。Exploring the pre-built templates in edit-mode and then modifying them to fit your needs and save your own custom workbook is an excellent way to start to learn about what is possible with Azure Monitor workbooks.

仪表板时间范围Dashboard time ranges

如果固定的项配置为使用“时间范围”参数,则固定的工作簿查询部分将遵循仪表板的时间范围。Pinned workbook query parts will respect the dashboard's time range if the pinned item is configured to use a Time Range parameter. 仪表板的时间范围值将用作时间范围参数的值,对仪表板时间范围进行任何更改会导致固定的项更新。The dashboard's time range value will be used as the time range parameter's value, and any change of the dashboard time range will cause the pinned item to update. 如果某个固定的部分正在使用仪表板的时间范围,则每当仪表板的时间范围发生更改时,你都会看到该固定部分的副标题更新为显示该时间范围。If a pinned part is using the dashboard's time range, you will see the subtitle of the pinned part update to show the dashboard's time range whenever the time range changes.

此外,使用时间范围参数的固定工作簿部分将按照仪表板时间范围确定的频率自动刷新。Additionally, pinned workbook parts using a time range parameter will auto refresh at a rate determined by the dashboard's time range. 上次运行查询的时间将显示在固定部分的副标题中。The last time the query ran will appear in the subtitle of the pinned part.

如果某个固定步骤具有显式设置的时间范围(不使用时间范围参数),则无论仪表板的设置如何,都始终会将该时间范围用于仪表板。If a pinned step has an explicitly set time range (does not use a time range parameter), that time range will always be used for the dashboard, regardless of the dashboard's settings. 固定部分的副标题不会显示仪表板的时间范围,并且查询不会在仪表板上自动刷新。The subtitle of the pinned part will not show the dashboard's time range, and the query will not auto-refresh on the dashboard. 副标题将显示上次执行查询的时间。The subtitle will show the last time the query executed.


目前,使用“合并”数据源的查询在固定到仪表板时不受支持。Queries using the merge data source are not currently supported when pinning to dashboards.

共享工作簿模板Sharing workbook templates

开始创建自己的工作簿模板后,你可能希望将其与更广泛的社区成员共享。Once you start creating your own workbook templates you might want to share it with the wider community. 若要了解详细信息,或要探索其他未包含在默认 Azure Monitor 库视图中的模板,请访问我们的 GitHub 存储库To learn more, and to explore other templates that aren't part of the default Azure Monitor gallery view visit our GitHub repository. 若要浏览现有的工作簿,请访问 GitHub 上的工作簿库To browse existing workbooks, visit the Workbook library on GitHub.

后续步骤Next step

  • 开始详细了解工作簿的丰富可视化选项。Get started learning more about workbooks many rich visualizations options.
  • 控制并共享对工作簿资源的访问权限。Control and share access to your workbook resources.