地图可视化效果Map visualization

通过提供聚合映射到每个位置/国家/地区/区域的所有数据的功能,地图可视化效果可帮助查明特定区域中的问题,并显示监视数据的大致聚合视图。The map visualization aids in pin-pointing issues in specific regions and showing high level aggregated views of the monitoring data by providing capability to aggregate all the data mapped to each location/country/region.

添加地图Adding a map

如果基础数据/指标具有纬度/经度信息、Azure 资源信息、Azure 位置信息或国家/地区/区域、名称或国家/地区/区域代码,则可让地图呈现可视化效果。Map can be visualized if the underlying data/metrics has Latitude/Longitude information, Azure resource information, Azure location information or country/region, name, or country/region code.

使用 Azure 位置Using Azure location

  1. 选择“编辑”工具栏项,将工作簿切换到编辑模式。Switch the workbook to edit mode by selecting on the Edit toolbar item.

  2. 选择“添加”,然后选择“添加查询” 。Select Add then Add query.

  3. 将“数据源”更改为 Azure Resource Graph,然后选择具有存储帐户的任何订阅。Change the Data Source to Azure Resource Graph then pick any subscription that has storage account.

  4. 为分析输入以下查询,然后选择“运行查询”。Enter the query below for your analysis and the select Run Query.

    where  type =~ 'microsoft.storage/storageaccounts'
    | summarize count() by location
    
  5. 将“大小”设置为 LargeSet Size to Large.

  6. 将“可视化效果”设置为 MapSet the Visualization to Map.

  7. 所有设置将自动填充。All the settings will be autopopulated. 对于自定义设置,选择“地图设置”按钮以打开“设置”窗格。For custom settings, select the Map Settings button to open the settings pane.

  8. 下面是地图可视化效果的屏幕截图,该屏幕截图显示了所选订阅的每个 Azure 区域的存储帐户。Below is a screenshot of the map visualization that shows storage accounts for each Azure region for the selected subscription.

带有上述查询的 Azure 位置地图的屏幕截图

使用 Azure 资源Using Azure resource

  1. 选择“编辑”工具栏项,将工作簿切换到编辑模式。Switch the workbook to edit mode by selecting on the Edit toolbar item.

  2. 选择“添加”,然后选择“添加指标”。Select Add then Add Metric.

  3. 使用具有存储帐户的订阅。Use a subscription that has storage accounts.

  4. 将“资源类型”更改为 storage account,然后在“资源”中选择多个存储帐户 。Change Resource Type to storage account and in Resource select multiple storage accounts.

  5. 选择“添加指标”并添加事务指标。Select Add Metric and add a Transaction metric.

    1. 命名空间:AccountNamespace: Account
    2. 指标:TransactionsMetric: Transactions
    3. 聚合:SumAggregation: Sum

    事务指标的屏幕截图

  6. 选择“添加指标”,然后添加成功的 E2E 延迟指标。Select Add Metric and add Success E2E Latency metric.

    1. 命名空间:AccountNamespace: Account
    2. 指标:Success E2E LatencyMetric: Success E2E Latency
    3. 聚合:AverageAggregation: Average

    成功的端到端延迟指标的屏幕截图

  7. 将“大小”设置为 LargeSet Size to Large.

  8. 将“可视化效果”的大小设置为 MapSet Visualization size to Map.

  9. 在“地图设置”中指定以下设置:In Map Settings set the following settings:

    1. 使用的位置信息:Azure ResourceLocation info using: Azure Resource
    2. Azure 资源字段:NameAzure resource field: Name
    3. 设置大小的依据:microsoft.storage/storageaccounts-Transaction-TransactionsSize by: microsoft.storage/storageaccounts-Transaction-Transactions
    4. 位置聚合:Sum of valuesAggregation for location: Sum of values
    5. 着色类型:HeatmapColoring Type: Heatmap
    6. 着色依据:microsoft.storage/storageaccounts-Transaction-SuccessE2ELatencyColor by: microsoft.storage/storageaccounts-Transaction-SuccessE2ELatency
    7. 颜色聚合:Sum of valuesAggregation for color: Sum of values
    8. 调色板:Green to RedColor palette: Green to Red
    9. 最小值:0Minimum value: 0
    10. 指标值:microsoft.storage/storageaccounts-Transaction-SuccessE2ELatencyMetric value: microsoft.storage/storageaccounts-Transaction-SuccessE2ELatency
    11. 聚合其他指标的依据:Sum of valuesAggregate other metrics by: Sum of values
    12. 选择“自定义格式设置”框Select the custom formatting box
    13. 单位:MillisecondsUnit: Milliseconds
    14. 样式:DecimalStyle: Decimal
    15. 最大小数位数:2Maximum fractional digits: 2

使用国家/地区Using country/region

  1. 选择“编辑”工具栏项,将工作簿切换到编辑模式。Switch the workbook to edit mode by selecting on the Edit toolbar item.

  2. 选择“添加”,然后选择“添加查询” 。Select *Add, then Add query.

  3. 将“数据源”更改为 LogChange the Data source to Log.

  4. 选择“资源类型”作为 Application Insights,然后选择包含 pageViews 数据的任何 Application Insights 资源。Select Resource type as Application Insights, then pick any Application Insights resource that has pageViews data.

  5. 使用查询编辑器输入用于分析的 KQL,然后选择“运行查询”。Use the query editor to enter the KQL for your analysis and select Run Query.

    pageViews
    | project duration, itemCount, client_CountryOrRegion
    | limit 20
    
  6. 将“大小”值设置为 LargeSet the size values to Large.

  7. 将“可视化效果”设置为 MapSet the visualization to Map.

  8. 所有设置将自动填充。All the settings will be autopopulated. 对于自定义设置,请选择“地图设置”。For custom settings, select Map Settings.

使用纬度/位置Using latitude/location

  1. 选择“编辑”工具栏项,将工作簿切换到编辑模式。Switch the workbook to edit mode by selecting on the Edit toolbar item.
  2. 选择“添加”,然后选择“添加查询” 。Select *Add, then Add query.
  3. 将“数据源”更改为 JSONChange the Data source to JSON.
  4. 在下面的查询编辑器中输入 JSON 数据,然后选择“运行查询”。Enter the JSON data in below in the query editor and select Run Query.
  5. 将“大小”值设置为 LargeSet the Size values to Large.
  6. 将“可视化效果”设置为 MapSet the Visualization to Map.
  7. 在“指标设置”下的“地图设置”中,将“指标标签”设置为 displayName,然后选择“保存并关闭”。In Map Settings under "Metric Settings", set Metric Label to displayName then select Save and Close.

下面的地图可视化效果显示了每个经度和纬度位置的用户,并带有选定的指标标签。The map visualization below shows users for each latitude and longitude location with the selected label for metrics.

地图可视化效果的屏幕截图,其中显示了每个经度和纬度位置的用户,并带有选定的指标标签

地图设置Map settings

布局设置Layout settings

设置Setting 说明Explanation
Location info using 选择一种方法来获取地图上显示的项的位置。Select a way to get the location of items shown on the map.
纬度/经度:如果有包含纬度和经度信息的列,请选择此选项。Latitude/Longitude: Select this option if there are columns with latitude and longitude information. 包含纬度和经度数据的每一行将在地图上显示为不同的项。Each row with latitude and longitude data will be shown as distinct item on the map.
Azure 位置:如果存在包含 Azure 位置(中国北部、中国东部等)信息的列,请选择此选项。Azure location: Select this option if there is a column that has Azure Location (chinanorth, chinaeast, etc.) information. 指定该列,它将为每个 Azure 位置获取相应的纬度和经度,将相同的位置行(基于指定的聚合)分组到一起,以在地图上显示位置。Specify that column and it will fetch the corresponding latitude and longitude for each Azure location, group same location rows(based on Aggregation specified) together to show the locations on the map.
Azure 资源:如果存在包含 Azure 资源信息(存储帐户、cosmosdb 帐户等)的列,请选择此选项。Azure resource: Select this option if there is a column that has Azure resource information (storage account, cosmosdb account, etc.). 指定该列,它将为每个 Azure 资源获取相应的纬度和经度,将相同的位置(Azure 资源)行(基于指定的聚合)分组到一起,以在地图上显示位置。Specify that column and it will fetch the corresponding latitude and longitude for each Azure resource, group same location (Azure location) rows (based on Aggregation specified) together to show the locations on the map.
国家/地区:如果存在包含国家/地区的名称/代码(CN、中国)信息的列,请选择此选项。Country/Region: Select this option if there is a column that has country/region name/code (CN, China) information. 指定该列,它将为每个国家/地区/区域/代码提取相应的纬度和经度,并将行与相同的国家/地区代码或国家/地区名称分组到一起,以在地图上显示位置。Specify that column and it will fetch the corresponding latitude and longitude for each Country/Region/Code and group the rows together with same Country-Region Code/Country-Region name to show the locations on the map. 国家/地区名称和国家/地区代码不会在地图上作为单个实体分组到一起。Country Name and Country code won't be grouped together as a single entity on the map.
Latitude/Longitude 如果“位置信息”字段值为以下值,则可以看到这两个选项:纬度/经度。These two options will be visible if Location Info field value is: Latitude/Longitude. 选择在纬度字段中和在经度字段中分别具有纬度和经度的列。Select the column that has latitude in the latitude field and longitude in the longitude field respectively.
Azure location field 如果“位置信息”字段值为以下值,则可以看到此选项:Azure 位置。This option will be visible if Location Info field value is: Azure location. 选择 Azure 位置信息所在的列。Select the column that the Azure location information.
Azure resource field 如果“位置信息”字段值为以下值,则可以看到此选项:Azure 资源。This option will be visible if Location Info field value is: Azure resource. 选择 Azure 资源信息所在的列。Select the column that the Azure resource information.
Country/Region field 如果“位置信息”字段值为以下值,则可以看到此选项:国家或地区。This option will be visible if Location Info field value is: Country or region. 选择国家/地区信息所在的列。Select the column that the Country/Region information.
Size by 此选项控制在地图上显示的项的大小。This option controls the size of the items shown on the map. 大小取决于用户指定列中的值。Size depends on value in the column specified by the user. 目前,圆的半径与列值的平方根成正比。Currently, radius of the circle is directly proportional to the square root of the column's value. 如果选择“无…”,则所有圆都将显示默认区域大小。If 'None...' is selected, all the circles will show the default region size.
Aggregation for location 此字段指定如何聚合具有相同 Azure 位置/Azure 资源或国家/地区的“设置大小的依据”列。This field specifies how to aggregate the size by columns that has same Azure Location/Azure Resource/Country-Region.
Minimum region size 此字段指定地图上显示的项的最小半径。This field specifies what is the minimum radius of the item shown on the map. 当“设置大小的依据”列的值之间存在很大差异时使用此设置,因此较小的项在地图上几乎不可见。This is used when there is a significant difference between the size by column's values, therefore smaller items are hardly visible on the map.
Maximum region size 此字段指定地图上显示的项的最大半径。This field specifies what is the maximum radius of the item shown on the map. 当“设置大小的依据”列的值非常大且覆盖地图上的大片区域时,将使用此设置。This is used when the size by column's values are extremely large and they are covering huge area of the map.
Default region size 此字段指定地图上显示的项的默认半径。This field specifies what is the default radius of the item shown on the map. 当“设置大小的依据”列为“无…”或值为 0 时,将使用默认半径。The default radius is used when the Size By column is 'None...' or the value is 0.
Minimum value 用于计算区域大小的最小值。The minimum value used to compute region size. 如果未指定,则最小值将是聚合后的最小值。If not specified, the minimum value will be the smallest value after aggregation.
Maximum value 用于计算区域大小的最大值。The maximum value used to compute region size. 如果未指定,则最大值将是聚合后的最大值。If not specified, the maximum value will be the largest value after aggregation.
Opacity of items on Map 此字段指定地图上显示的项的透明度。This field specifies how transparent are the items shown on the map. 不透明度 1 表示没有透明度,而不透明度 0 表示项在地图上不可见。Opacity of 1 means, no transparency, where opacity of 0 means, items won't be visible on the map. 如果地图上的项太多,可以将不透明度设置为较低的值,以便所有重叠的项都可见。If there are too many items on the map, opacity can be set to low value so that all the overlapping items are visible.

颜色设置Color settings

着色类型Coloring Type 说明Explanation
None 所有节点都具有相同的颜色。All nodes have the same color.
Thresholds 在此类型中,单元颜色由阈值规则设置(例如 CPU > 90% => 红色,60% > CPU > 90% => 黄色,CPU < 60% => 绿色)。In this type, cell colors are set by threshold rules (for example, CPU > 90% => Red, 60% > CPU > 90% => Yellow, CPU < 60% => Green).
  • 着色依据:阈值/热度地图逻辑将使用此列的值。Color by: Value of this column will be used by Thresholds/Heatmap logic.
  • 颜色聚合:此字段指定如何聚合具有相同 Azure 位置/Azure 资源或国家/地区的“着色依据”列。Aggregation for color: This field specifies how to aggregate the color by columns that has the same Azure Location/Azure Resource/Country-Region.
    Heatmap 在此类型中,单元根据调色板和“着色依据”字段进行着色。In this type, the cells are colored based on the color palette and Color by field. 这还将具有与阈值相同的“着色依据”和“颜色聚合”选项 。This will also have same Color by and Aggregation for color options as thresholds.

    指标设置Metric settings

    设置Setting 说明Explanation
    Metric Label 如果“位置信息”字段值为以下值,则可以看到此选项:纬度/经度。This option will be visible if Location Info field value is: Latitude/Longitude. 使用此功能,用户可以选取要为地图下方显示的指标显示的标签。Using this feature, user can pick the label to show for metrics shown below the map.
    Metric Value 此字段指定要在地图下方显示的指标值。This field specifies metric value to be shown below the map.
    Create 'Others' group after 此字段指定创建“其他”组之前的限制。This field specifies the limit before an "Others" group is created.
    Aggregate 'Others' metrics by 此字段指定用于“其他”组的聚合(如果显示的话)。This field specifies the aggregation used for "Others" group if it is shown.
    Custom formatting 使用此字段可以设置数字值的单位、样式和格式设置选项。Use this field to set units, style, and formatting options for number values. 这与网格的自定义格式设置相同。This is same as grid's custom formatting.

    后续步骤Next steps