Azure Monitor 视图设计器磁贴转换Azure Monitor view designer tile conversions

视图设计器是 Azure Monitor 的一项功能,它让你能够创建自定义视图,帮助你通过图表、列表和时间线将 Log Analytics 工作区中的数据可视化。View designer is a feature of Azure Monitor that allows you to create custom views to help you visualize data in your Log Analytics workspace, with charts, lists, and timelines. 这些元素已逐步淘汰,取而代之的是除这些功能外还可提供其他功能的工作簿。They are being phased out and replaced with workbooks which provide additional functionality. 本文详细介绍如何将不同的磁贴转换为工作簿。This article provides details for converting different tiles to workbooks.

圆环图和列表磁贴Donut & list tile

圆环图列表

在工作簿中重新创建圆环图和列表磁贴涉及两种不同的可视化效果。Recreating the donut & list tile in workbooks involves two separate visualizations. 对于圆环图部分,有两个选项。For the donut portion there are two options. 对于这两个选项,首先选择“添加查询”,然后将原始查询从视图设计器粘贴到单元格中。For both start by selecting Add query and paste the original query from view designer into the cell.

选项 1:从“可视化效果”下拉列表中选择“饼图” :饼图可视化效果菜单Option 1: Select Pie Chart from the Visualization dropdown: Pie chart visualization menu

选项 2:从“可视化效果”下拉列表中选择“按查询设置”,然后将 | render piechart 添加到查询 :Option 2: Select Set by query from the Visualization dropdown and add | render piechart to the query:

可视化效果菜单

示例Example

原始查询Original query

search * 
| summarize AggregatedValue = count() by Type 
| order by AggregatedValue desc

更新后的查询Updated query

search * 
| summarize AggregatedValue = count() by Type 
| order by AggregatedValue desc 
| render piechart

有关创建列表和启用迷你图的说明,请参阅关于常见任务的文章。For creating a list and enabling sparklines, see the article on common tasks.

下面是在工作簿中重新解释圆环图和列表磁贴的效果示例:Following is an example of how the donut & list tile might be reinterpreted in workbooks:

圆环图列表工作簿

折线图和列表磁贴Line chart & list tile

折线图列表

若要重新创建折线图部分,请更新查询,如下所示:To recreate the line chart portion update the query as follows:

原始查询Original query

search * 
| summarize AggregatedValue = count() by Type

更新后的查询Updated query

search * 
| make-series Count = count() default=0 on TimeGenerated from {TimeRange:start} to {TimeRange:end} step {TimeRange:grain} by Type

有两个可用于将折线图可视化的选项There are two options for visualizing the line chart

选项 1:从“可视化效果”下拉列表中选择“折线图” :Option 1: Select Line chart from the Visualization dropdown:

折线图菜单

选项 2:从“可视化效果”下拉列表中选择“按查询设置”,然后将 | render linechart 添加到查询 :Option 2: Select Set by query from the Visualization dropdown and add | render linechart to the query:

可视化效果菜单

示例Example

search * 
| make-series Count = count() default=0 on TimeGenerated from {TimeRange:start} to {TimeRange:end} step {TimeRange:grain} by Type 
| render linechart_

有关创建列表和启用迷你图的说明,请参阅关于常见任务的文章。For creating a list and enabling sparklines, see the article on common tasks.

下面是在工作簿中重新解释折线图和列表磁贴的效果示例:Following is an example of how the line chart & list tile might be reinterpreted in workbooks:

折线图列表工作簿

数字和列表磁贴Number & list tile

磁贴列表

对于数字磁贴,请按如下所示更新查询:For the number tile, update the query as follows:

原始查询Original query

search * 
| summarize AggregatedValue = count() by Computer | count

更新后的查询Updated query

search *
| summarize AggregatedValue = count() by Computer 
| summarize Count = count()

将“可视化效果”下拉列表更改为“磁贴”,然后选择“磁贴设置” 。Change the Visualization dropdown to Tiles and then select Tile Settings. 磁贴可视化效果Tile Visualization

将“标题”部分留空,然后选择“左” 。Leave the Title section blank and select Left. 将“使用列”的值更改为“计数”,并将“列呈现器”的值更改为“大数字” :Change the value for Use column: to Count, and Column Renderer to Big Number:

磁贴设置

有关创建列表和启用迷你图的说明,请参阅关于常见任务的文章。For creating a list and enabling sparklines, see the article on common tasks.

下面是在工作簿中重新解释数字和列表磁贴的效果示例:Following is an example of how the number & list tile might be reinterpreted in workbooks:

数字列表工作簿

时间线和列表Timeline & List

时间线列表

对于时间线,请按如下所示更新查询:For the timeline update your query as follows:

原始查询Original query

search * 
| sort by TimeGenerated desc

更新后的查询Updated query

search * 
| summarize Count = count() by Computer, bin(TimeGenerated,{TimeRange:grain})

有两个可用于将查询可视化为条形图的选项:There are two options for visualizing the query as a bar chart:

选项 1:从“可视化效果”下拉列表中选择“条形图” :可视化效果Option 1: Select Bar chart from the Visualization dropdown: Barchart visualization

选项 2:从“可视化效果”下拉列表中选择“按查询设置”,然后将 | render barchart 添加到查询 :Option 2: Select Set by query from the Visualization dropdown and add | render barchart to the query:

可视化效果菜单

有关创建列表和启用迷你图的说明,请参阅关于常见任务的文章。For creating a list and enabling sparklines, see the article on common tasks.

下面是在工作簿中重新解释时间线和列表磁贴的效果示例:Following is an example of how the timeline & list tile might be reinterpreted in workbooks:

时间线列表工作簿

后续步骤Next steps