All Products
Search
Document Center

Simple Log Service:Search, filter, variable replacement, and multi-statement query

Last Updated:Mar 25, 2026

This topic explains how to configure the search, filter, variable replacement, and multi-statement query features for a table chart.

Prerequisites

Overview

image

  1. Query and analysis: Use the console to query and analyze logs. For example, you can retrieve logs, aggregate data, and view statistics.

  2. Add a chart: A dashboard consists of one or more charts, and each chart uses one or more query statements.

  3. Configure common features for a table chart: Set up search, filter, variable replacement, and multi-statement query features for your table chart.

Step 1: Query and analyze data

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

    image

  2. On the Log Storage > Logstores tab, click the logstore you want.

    image

  3. Enter a query statement and click Last 15 Minutes to set the time range.

    Example:

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, choose Add > Add Chart.

    image

  2. Under General Configurations, set Chart Type to image. On the Query and Analysis tab, select LogStore (SQL) and the destination Logstore, and then enter a query statement. In this example, LogStore is used.

    In the upper-right corner of the page, select a time range, such as Last 15 Minutes, from the drop-down list and click Apply.

    image

Step 3: Configure common table features

Search and filter

  • Search

    • Choose Field/Column Settings > Search Mode > Search. The search feature supports all fields in the chart.

    • Click the image icon to the right of a column name, and enter the content that you want to search for.

      image

  • Filter

    • Choose Field/Column Settings > Search Mode > Filter. The filter feature supports all fields in the chart.

    • Click the image > image icons to the right of a column name. The filter feature supports multiple selections.

      image

Variable replacement

Go to Variable Replacement > Add Variable Replacement. Set Variable Key to date and Display Name to time. Add a Variable Value List. In the list, set Display Name to min and Replacement Value to 100. This action replaces the date variable in Query and Analysis A with min.

image

After you complete the configuration, a filter appears in the upper-left corner of the chart. When you select a value, Simple Log Service runs a query based on your selection. The corresponding query statement is * | select __time__ - __time__ % 100 as time,request_method.

image

Multi-statement query

Add Query and Analysis > LogStore (SQL): Select the LogStore that you want to query (request_path), enter the query statement * | select *, and click Apply. Then, select Query and Analysis B to view the results of the current query and analysis.

image