All Products
Search
Document Center

Simple Log Service:Configure chart type settings for a multi-axis chart

Last Updated:Oct 28, 2024

You can use a multi-axis chart to view the differences of multiple metrics on the same dashboard. You can configure a chart type such as Line, Column, or Point for each metric on the chart.

Prerequisites

Effect preview

image

  1. Query and analyze data: You can query and analyze the collected logs in the Simple Log Service console. For example, you can retrieve logs, aggregate logs, and collect statistics on logs.

  2. Add a chart: Each dashboard consists of multiple charts. Each chart displays the results of one or more query statements.

  3. Configure chart type settings: Configure a chart type such as Line, Column, or Point for each metric indicated by different y axes.

Step 1: Query and analyze data

  1. Log on to the Simple Log Service console. In the Projects section, click the project you want.

  2. In the left-side navigation pane, click Log Storage. In the Logstores list, click the logstore you want.

    image

  3. Input the query and analysis statement and click Last 15 Minutes to define the time range for your query.

    Example:

    • Here is the query statement for Query Analysis A:

      * | select __time__,count(request_url) as pv,count(request_url)-50 as pv1,count(request_url)+50 as pv2 group by __time__

Step 2: Add a chart

  1. In the left-side navigation pane, choose Dashboard > Dashboards. In the dashboard list, click the dashboard you want. In the upper-right corner of the dashboard page, click Edit. In edit mode, click Add > Add Chart.

    image

  2. On the General Configurations tab, click image in the Chart Types section. On the Search & Analysis tab, select Logstore (SQL) and choose the logstore you want, and enter the query statement. Select a time range, such as Last 15 Minutes, and click OK.

    • Query and Analysis Configurations: Set Axis X Field to __time__, and Axis Y Field to pv, pv1, pv2.

    image

Step 3: Configure chart type settings

Column

Graph Configurations > Graph Type > Column: Display the pv field in columns.

image

Point

Graph Configurations > Graph Type > Point: Display the pv1 field in points.

image