a specific type of flow chart, is used to describe the flow from one set of values
to another, and is applicable to scenarios such as network flow data. Generally,
the Sankey diagram contains three sets of values:
target , and
target describes the edge relationship between nodes, and
value describes the relationship between
The Sankey diagram has the following features:
- The start flow is the same as the end flow. The overall width of all the main branches is the same as that of all the branches. Therefore, the energy balance is maintained.
- Internally, different lines indicate the distribution of different flows, and the line width indicates the flow occupied by the branch proportionally.
- Different node widths indicate the flows in the particular statuses.
The Sankey diagram visualizes the preceding data as follows.
|Start column||Describes the start node.|
|End column||Describes the end node.|
|A value column||The value that links the start node and the end node.|
|Spacing||The distance between the coordinate axis and the graph boundary.|
- On the query page, enter the query statement in the search box, select the time interval, and click Search.
- Click the Graph and select the Sankey diagram .
- Configure the graph properties.
Ordinary Sankey diagram
value, each log itself is the relationship between nodes and edges, and the sum of
steamValuecan be obtained using Nested subquery Nested subquery.
* | select sourceValue, targetValue, sum(streamValue) as streamValue from (select sourceValue, targetValue, streamValue, __time__ from log group by sourceValue, targetValue, streamValue, __time__ order by __time__ desc) group by sourceValue, targetValue
Access logs of Layer-7 Server Load Balancer scenario
Log Service supports Access logs of Layer-7 Server Load Balancer, so you can use access logs to build a Sankey diagram.
* | select COALESCE(client_ip, slbid, host) as source, COALESCE(host, slbid, client_ip) as dest, sum(request_length) as inflow group by grouping sets( (client_ip, slbid), (slbid, host))