A topology chart helps you visualize your system architecture, service dependencies, and data flow. This topic describes how to configure a topology chart.
Overview
A topology chart is a global, system-level observability view that clearly shows the dependencies and general status of your modules or applications.
When Simple Log Service collects topology data, it parses and structures the data. The following figure shows an example of topology data. You can use the child and parent fields to understand the basic dependencies between modules or applications, but this method is not visually intuitive.

Based on this topology data, Simple Log Service lets you use a query and analysis statement to extract fields that describe the topology relationships. For example, you can run the * | SELECT child, parent, child_type, parent_type FROM log statement to retrieve the child, child_type, parent, and parent_type fields. Simple Log Service then generates a topology chart from these fields and supports display options such as force-directed layout, hierarchical layout, or circular layout.

For instructions on how to add a topology chart to a dashboard, see Add charts to a dashboard.
Configuration example
Log on to the Simple Log Service console. In the Projects section, click the project you want.

-
In the left-side navigation pane, choose . In the Dashboard list, click the dashboard you want. In the upper-right corner of the dashboard page, click Edit. In edit mode, choose .
-
As shown in the following figure, on the right side of the page, configure Topology Configuration and Layout Configuration. On the left side, set the time range, Logstore, and query and analysis statement. Then, click Apply at the top of the page to view the chart configuration results.

The following query and analysis statement retrieves the child_service, parent_service, and type fields. Simple Log Service then generates a topology chart from these fields.
version: service | select child_service, parent_service, 'SERVER' as type from log
General configurations
Configure global settings for the topology chart.
Basic Configurations
Parameter
Description
Title
The title of the chart.
Display Title
If you turn on Display Title, the title of the chart is displayed.
Display Border
If you turn on Display Border, the borders of the chart are displayed.
Display Background
If you turn on Display Background, the background color of the chart is displayed.
Display Time
If you turn on Display Time, the query time range of the chart is displayed.
Fixed Time
If you turn on Fixed Time, the query time range of the chart is independent of the global time range of the dashboard.
-
Topology configuration
Parameter
Description
Child Node Type
Select the field that represents the child node type.
Child Node ID
Select the field that represents the child node ID.
Parent Node Type
Select the field that represents the parent node type.
Parent Node ID
Select the field that represents the parent node ID.
Note-
Simple Log Service provides 13 built-in node icons for topology charts: Server, Database, WEB, Message Queue (MQ), Server Load Balancer (SLB), Web Application Firewall (WAF), Object Storage Service (OSS), Alibaba Cloud DNS, Switch, Router, Android, iOS, and Windows.
-
If you do not specify a node type by configuring Child Node Type and Parent Node Type, Simple Log Service uses the Server icon by default.
-
Variable substitution
Parameter
Description
Variable substitution
Variable substitution is equivalent to adding a filter of the variable type to a single chart. After you configure variable substitution in General configurations, Simple Log Service adds a filter to the upper-left corner of the current chart. You can select a value from the filter. Simple Log Service automatically replaces the variable in the query and analysis statement with the selected variable value and runs a query and analysis operation. For a configuration example, see Example 2: Set variable substitution.
Node metric configuration
After you complete the general configurations, Simple Log Service generates a topology chart that shows only the dependencies between nodes without any metric data. You can then configure node metrics to add metrics to the chart.
The following figure shows a sample of metric data. The node field represents a node and corresponds to the child and parent fields in the topology data. Therefore, you can use the node field to associate the metric data with the topology data and display node metrics on the chart.
Simple Log Service allows you to configure different metrics for different types of nodes. This example uses a WEB node (A > WEB).
In the A > WEB section, select the Project and Logstore that contain the metric data, enter a query and analysis statement to retrieve metric fields, and then configure the metrics. For example, if metric_1 represents latency, you can run the * | SELECT max(metric_1) AS maxLantency, min(metric_1) AS minLantency, node FROM log GROUP BY node statement to calculate the maximum and minimum latency of the node.
After you complete the configuration, hover over a node in the topology chart to view its metric data. If you click the node, the system hides unrelated nodes and connection lines.

Connection line metric configuration
Query and analysis statements and their resulting fields determine the dependencies between nodes in a topology chart. Different types of connection lines correspond to different analysis queries. To configure connection line metrics, you must specify the fields representing those metrics in the query and analysis statement that extracts the topology nodes.
Topology data can contain metrics for connection lines. For example, in the topology data, metric_1 can represent the response time, and metric_2 can represent the latency. You can use Query A to extract the metric_1 and metric_2 fields and then configure these fields in the Connection line metric configuration section.
After you complete the configuration, hover over a connection line in the topology chart to view its metrics. If you click the connection line, the system hides unrelated nodes and connection lines.

Interaction occurrences
Interaction occurrences in a topology chart enable drill-down analysis on nodes for deeper data exploration. Supported interaction occurrences include Open Logstore, Open Saved Search, Open Dashboard, Open Trace Analysis, Open Trace Details, and Create Custom HTTP URL. For more information, see Add interaction occurrences to a dashboard for drill-down analysis.
For example, A > SERVER indicates that you are setting an interaction occurrence for a SERVER node from Query A. If you set the interaction occurrence for the SERVER node to Create Custom HTTP URL, you can right-click the SERVER node in the topology chart and click Create Custom HTTP URL to navigate to the specified link.
