All Products
Search
Document Center

Simple Log Service:Create a dashboard

Last Updated:Nov 18, 2024

Simple Log Service provides dashboards as a visualization tool to display query and analysis results in charts, such as column charts, line charts, and pie charts. You can use dashboards to monitor the status of systems, applications, and services. This topic describes the concept and scenarios of dashboards. This topic also describes how to create a dashboard.

Introduction to dashboards

Dashboards are used to display query and analysis results in charts, such as column charts, line charts, and pie charts. Each dashboard consists of one or more charts. Each chart displays the query and analysis results of one or more query statements. When you open or refresh a dashboard, a query operation is automatically performed for each chart on the dashboard.

You can use dashboards to monitor key observable metrics, detect anomalies in metrics, and identify the root causes of the anomalies. You can share dashboard pages with other users in password-free mode. This helps improve communication efficiency between teams and resolve issues in collaboration.

Scenarios

Real-time monitoring and visualization

You can convert complex log data, event data, and other monitoring data to charts and chart elements displayed on dashboards. This way, you can monitor the status of systems and applications and security events in real time.

Quick detection of abnormal metrics

You can detect abnormal behavior of key metrics on a dashboard, such as a reduced success rate and insufficient resources, based on the thresholds and alert rules that you configure. You can also identify abnormal metrics in an efficient manner based on historical comparison and multi-dimensional analysis. This improves the stability and response speed of systems and services.

Identify the root causes of anomalies

When an anomaly is detected on a dashboard, you can configure an interaction occurrence to associate charts on the dashboard with multiple data sources such as logs, metrics, and traces. This helps analyze the root cause of the anomaly.

Password-free sharing and integration of dashboard pages

Simple Log Service allows you to share dashboard pages with other users and integrate dashboard pages into third-party systems. This way, users can view the dashboard pages in password-free mode.

Procedure

This section describes how to create a dashboard based on a Classic Load Balancer (CLB) access log to monitor page view (PV) trends by request method. You can add a request method filter to view the PV trends for each request method. For more information, see Overview of CLB access logs. Sample log:

{
    "body_bytes_sent": "1346",
    "client_ip": "118.*.*.125",
    "host": "www.*.*.com",
    "http_host": "www.*.*.com",
    "request_length": "15**",
    "request_method": "PUT",
    "request_time": "26",
    "scheme": "https",
    "slbid": "slb-02",
    "status": "200",
    "upstream_addr": "133.*.*.113",
    "upstream_response_time": "18",
    "upstream_status": "200",
    "vip_addr": "39.*.*.121",
    "__pack_meta__": "1|MTcyNDE*==|120|119",
    "__topic__": "slb_layer7",
    "__source__": "127.0.0.1",
    "__tag__:__receive_time__": "1725349464",
    "__tag__:__receive_time___0": "1725349464",
    "__time__": "1725349464"
}

To create a dashboard in Simple Log Service, you need to only perform the following steps:

  1. Add a dashboard: Add a dashboard in the Simple Log Service console. You can add multiple charts to the dashboard.

  2. Add a chart: Add a chart to the dashboard to display the results of your query statement.

  3. Add a filter: Add a filter and specify filter conditions. You can filter data based on the field that you specify in your query statement.

1. Add a dashboard

Log on to the Simple Log Service console. Click the project that you want to manage. In the left-side navigation pane of the page that appears, choose Dashboard > Dashboards. Then, add a dashboard.

image

2. Add a chart

  1. Click Add Chart.

    image

  2. Configure and save a chart.

    1. On the left side of the page that appears, configure the query time range, Logstore, and query statement for the chart.

    2. On the right side of the page that appears, select a chart type in the Chart Types section and configure the Axis X Field, Axis Y Field, and Aggregate Column parameters in the Query and Analysis Configurations section. After you complete the configuration, click Apply in the upper part of the page to view the configuration effects of the chart. Then, click OK in the upper-right corner of the page to save the chart.

      Query statement:

      SELECT 
          DATE_FORMAT(DATE_TRUNC('minute', __time__), '%m-%d %H:%i') AS t,
          request_method,
          COUNT(*) AS pv
      GROUP BY 
          t, 
          request_method
      ORDER BY 
          t ASC
      LIMIT 10000;

    image

  3. Click the chart and drag the lower-right corner of the chart to adjust the size of the chart. Then, click Save in the upper-right corner of the page to save the chart.

    image

3. Add a filter

The chart displays PV trends for all request methods. If you want to view the PV trends for a specific request method, you can add a filter and select the required field from the filter drop-down list. You do not need to modify the specified query statement.

  1. In the upper-right corner of the dashboard page, click Edit to enter the edit mode. Click the filter icon in the top navigation bar.

    image

  2. Configure a filter.

    A filter searches for logs that contain the specified key-value pair in the results of the specified query statement. To view the PV trends for the POST request method, you can configure a filter to search for logs that contain request_method:POST in the results of the specified query statement.

    In the Filter panel, specify request_method for the Key Value parameter as the filter condition. Then, turn on Add Dynamic List Item and specify the *|select distinct request_method query statement in the Search & Analysis field to query the values of the request_method field. You can select the values from the filter drop-down list.

    image

  3. Click Save in the upper-right corner of the dashboard page.

    image

  4. Select the POST request method from the filter drop-down list. Then, the chart displays the PV trends for the POST request method.

References

  • This topic describes how to add a single chart to a dashboard. You can also add multiple charts to a dashboard. This way, you can view the charts in a centralized manner. For more information about how to configure a dashboard and different types of charts, see Monitor and visualize data in real time.

  • After you create a dashboard, you can share the dashboard page with a DingTalk account, a WeCom account, or an Alibaba Cloud account. You can also provide a shared URL of the page to allow password-free access to the page in a browser. For more information, see Share and integrate dashboard pages in password-free mode.

  • When an anomaly is detected on a dashboard, you can configure an interaction occurrence to perform drill-down analysis in an efficient manner. For example, you can select Open Logstore, Open Trace Analysis, or Open Dashboard from the Add Event drop-down list to configure an interaction occurrence and identify the root cause of the anomaly. For more information, see Perform drill-down analysis on dashboards to troubleshoot errors.

  • Dashboards are expected to help users identify abnormal metrics in charts at the earliest opportunity. You can specify thresholds and background colors for charts on a dashboard. You can also configure alert rules for charts. For more information, see Use dashboards to identify abnormal metrics