Azure Monitor 工作簿数据源Azure Monitor workbooks data sources

工作簿与大量的数据源兼容。Workbooks are compatible with a large number of data sources. 本文详细介绍当前可用于 Azure Monitor 工作簿的数据源。This article will walk you through data sources which are currently available for Azure Monitor workbooks.


工作簿允许查询来自以下源的日志:Workbooks allow querying logs from the following sources:

  • Azure Monitor 日志(Application Insights 资源和 Log Analytics 工作区。)Azure Monitor Logs (Application Insights Resources and Log Analytics Workspaces.)
  • 以资源为中心的数据(活动日志)Resource-centric data (Activity logs)

工作簿作者可以使用用于转换基础资源数据的 KQL 查询,以选择可作为文本、图表或网格可视化的结果集。Workbook authors can use KQL queries that transform the underlying resource data to select a result set that can visualized as text, charts, or grids.


工作簿作者可以轻松查询多个资源,以创建真正统一的丰富报表体验。Workbook authors can easily query across multiple resources creating a truly unified rich reporting experience.


Azure 资源发出可以通过工作簿访问的指标Azure resources emit metrics that can be accessed via workbooks. 可以在工作簿中通过一个专用控件访问指标,该控件可让你指定目标资源、所需指标和聚合。Metrics can be accessed in workbooks through a specialized control that allows you to specify the target resources, the desired metrics, and their aggregation. 然后,可以在图表或网格中绘制这些数据。This data can then be plotted in charts or grids.

CPU 利用率工作簿指标图表的屏幕截图


Azure Resource GraphAzure Resource Graph

工作簿支持使用 Azure Resource Graph (ARG) 查询资源及其元数据。Workbooks support querying for resources and their metadata using Azure Resource Graph (ARG). 此功能主要用于生成报表的自定义查询范围。This functionality is primarily used to build custom query scopes for reports. 资源范围通过 ARG 支持的 KQL 子集来表示 - 这通常足以满足常见用例。The resource scope is expressed via a KQL-subset that ARG supports - which is often sufficient for common use cases.

若要让查询控件使用此数据源,请使用“查询类型”下拉列表选择“Azure Resource Graph”,然后选择目标订阅。To make a query control use this data source, use the Query type drop-down to choose Azure Resource Graph and select the subscriptions to target. 使用“查询”控件添加选择有意义资源子集的 ARG KQL 子集。Use the Query control to add the ARG KQL-subset that selects an interesting resource subset.

Azure Resource Graph KQL 查询的屏幕截图

Azure Resource ManagerAzure Resource Manager

工作簿支持 Azure 资源管理器 REST 操作。Workbook supports Azure Resource Manager REST operations. 这样便可以查询 终结点,而无需提供自己的授权标头令牌。This allows the ability to query endpoint without the need to provide your own authorization header token.

若要让查询控件使用此数据源,请使用“数据源”下拉列表选择“Azure 资源管理器”。To make a query control use this data source, use the Data source drop-down to choose Azure Resource Manager. 提供适当的参数,例如 Http 方法、URL 路径、标头、URL 参数和/或正文。Provide the appropriate parameters such as Http method, url path, headers, url parameters and/or body.


目前仅支持 GETPOSTHEAD 操作。Only GET, POST, and HEAD operations are currently supported.

Azure 数据资源管理器Azure Data Explorer

工作簿现在支持使用强大的 Kusto 查询语言从 Azure 数据资源管理器群集进行查询。Workbooks now have support for querying from Azure Data Explorer clusters with the powerful Kusto query language.

Kusto 查询窗口的屏幕截图

工作负载运行状况Workload health

Azure Monitor 提供主动监视 Windows 或 Linux 来宾操作系统可用性和性能的功能。Azure Monitor has functionality that proactively monitors the availability and performance of Windows or Linux guest operating systems. Azure Monitor 为关键组件及其关系、有关如何度量这些组件的运行状况的条件,以及在检测到不正常情况时由哪些组件会发出警报的设置建模。Azure Monitor models key components and their relationships, criteria for how to measure the health of those components, and which components alert you when an unhealthy condition is detected. 工作簿允许用户使用这些信息创建丰富的交互式报表。Workbooks allow users to use this information to create rich interactive reports.

若要让查询控件使用此数据源,请使用“查询类型”下拉列表选择“工作负荷运行状况”,然后选择目标订阅、资源组或 VM 资源。To make a query control use this data source, use the Query type drop-down to choose Workload Health and select subscription, resource group or VM resources to target. 使用运行状况筛选器下拉列表,根据分析需求选择有意义的运行状况事件子集。Use the health filter drop downs to select an interesting subset of health incidents for your analytic needs.


Azure 资源运行状况Azure resource health

工作簿支持获取 Azure 资源运行状况,并将其与其他数据源合并,以创建丰富的交互式运行状况报告Workbooks support getting Azure resource health and combining it with other data sources to create rich, interactive health reports

若要让查询控件使用此数据源,请使用“查询类型”下拉列表选择“Azure 运行状况”,然后选择目标资源。To make a query control use this data source, use the Query type drop-down to choose Azure health and select the resources to target. 使用运行状况筛选器下拉列表,根据分析需求选择有意义的资源问题子集。Use the health filter drop downs to select an interesting subset of resource issues for your analytic needs.



使用 JSON 提供程序可从静态 JSON 内容创建查询结果。The JSON provider allows you to create a query result from static JSON content. 它最常用于在参数中创建静态值的下拉列表参数。It is most commonly used in Parameters to create dropdown parameters of static values. 简单的 JSON 数组或对象将自动转换为网格行和列。Simple JSON arrays or objects will automatically be converted into grid rows and columns. 有关更具体的行为,可使用“结果”选项卡和 JSONPath 设置来配置列。For more specific behaviors, you can use the Results tab and JSONPath settings to configure columns.

此提供程序支持 JSONPathThis provider supports JSONPath.

警报(预览版)Alerts (preview)


建议使用 Azure Resource Graph 数据源通过查询 AlertsManagementResources 表来查询 Azure 警报信息。The suggested way to query for Azure Alert information is by using the Azure Resource Graph data source, by querying the AlertsManagementResources table.

有关示例,请参阅 Azure Resource Graph 表格引用警报模板See the Azure Resource Graph table reference, or the Alerts template for examples.

作者转换为使用 ARG 时,警报数据源将在一段时间内保持可用。The Alerts data source will remain available for a period of time while authors transition to using ARG. 不建议在模板中使用此数据源。Use of this data source in templates is discouraged.

工作簿允许用户可视化与其资源相关的活动警报。Workbooks allow users to visualize the active alerts related to their resources. 限制:警报数据源需要对订阅的读取访问权限才能查询资源,并且可能不会显示较新的警报类型。Limitations: the alerts data source requires read access to the Subscription in order to query resources, and may not show newer kinds of alerts.

若要让查询控件使用此数据源,请使用“数据源”下拉列表选择“警报(预览)”,然后选择目标订阅、资源组或资源 。To make a query control use this data source, use the Data source drop-down to choose Alerts (preview) and select the subscriptions, resource groups, or resources to target. 使用警报筛选器下拉列表根据分析需求选择一个所关注的警报子集。Use the alert filter drop downs to select an interesting subset of alerts for your analytic needs.

自定义终结点Custom endpoint

工作簿支持从任何外部源获取数据。Workbooks support getting data from any external source. 如果数据位于 Azure 外部,可以使用此数据源类型将数据引入工作簿。If your data lives outside Azure you can bring it to Workbooks by using this data source type.

若要让查询控件使用此数据源,请使用“数据源”下拉列表选择“自定义终结点” 。To make a query control use this data source, use the Data source drop-down to choose Custom Endpoint. 提供适当的参数,如 Http methodurlheadersurl parameters 和/或 bodyProvide the appropriate parameters such as Http method, url, headers, url parameters and/or body. 请确保数据源支持 CORS,否则请求将会失败。Make sure your data source supports CORS otherwise the request will fail.

若要避免在使用模板时自动调用不受信任的主机,用户需要将使用的主机标记为受信任。To avoid automatically making calls to untrusted hosts when using templates, the user needs to mark the used hosts as trusted. 为此,可以单击“添加为受信任”按钮,或在工作簿设置中将其添加为受信任的主机。This can be done by either clicking on the Add as trusted button, or by adding it as a trusted host in Workbook settings. 这些设置将保存在支持带有 Web 辅助角色的 IndexDb 的浏览器中。These settings will be saved in browsers that support IndexDb with web workers.


请勿在任何字段(headersparametersbodyurl)中写入任何机密,因为这些字段对所有工作簿用户均可见。Do not write any secrets in any of the fields (headers, parameters, body, url), since they will be visible to all of the Workbook users.

此提供程序支持 JSONPathThis provider supports JSONPath.

后续步骤Next steps