Type | Description | Scope |
Filter data in all charts on the dashboard by specifying the field value. If statistics is enabled in the index configuration of the log topic for the filter field, the field value can be automatically obtained as a list item. | All charts on the dashboard | |
Filter data in all charts on the dashboard by entering a search statement, that is, add a filter in the query statement of the charts.Filter by search statement includes filter by range, NOT, and full text. | All charts on the dashboard | |
A data source variable enables batch switching data sources of the charts on the dashboard. It is applicable to scenarios such as applying a dashboard to multiple log topics and comparing data in blue and green on the dashboard. | Charts using this variable in the dashboard | |
A custom variable can be set to a static input or a value from a dynamic query and applied to search statements, titles, and text charts for quick batch statement modification. | Charts using this variable in the dashboard | |
System preset variables can be directly referenced in statements without configuration, automatically replacing the corresponding fields in the statements. They are applicable in scenarios requiring adaptive time granularity and automatic obtaining of the current time range. | Charts using this variable in the dashboard |

Form Element | Description |
Type | Different types correspond to different configuration items and application scenarios. Here, select **Filter in the drop-down list**. |
Filter Alias | It is the filter name displayed on the UI, which is optional. If it is left empty, the filter field will be used automatically. |
Log type | It is the log topic to which the filter field belongs. |
Filter field | It is the object field to be filtered. |
Dynamic options | After it is enabled, the filter field value will be obtained automatically as the filter option. |
Cascading Filter | Select the parent filter field to which the current filter field is cascaded. After configuration, only filter items that meet the parent filter condition will be displayed. Common examples include fields with cascading relationships, such as country and province. |
Static options | A static option is optional, needs to be added manually, and will be always displayed. You can configure its alias. |
Default Filter | (Optional) Used to configure default filter items when the dashboard is initially viewed. |
Default Filter Method | Used to configure the default filter mode for the filter when the dashboard is viewed. You can select Include or Exclude. Include is used by default. |
Multiple items | After it is enabled, multiple filters can be selected as the filter condition. |

Form Element | Description |
Type | Different types correspond to different configuration items and application scenarios. Here, select Filter by search statement. |
Filter name | The name of the filter, which should be unique and cannot be duplicated. |
Filter alias | (Optional) The display name of the filter on the interface. |
Log Topic | The log topic from which the filter field is sourced. |
Mode | The input mode for search statements, supporting both interactive mode and statement mode. |
Default filter | (Optional) Used to configure default filter items when the dashboard is initially viewed. |


Form Element | Description |
Type | The category of the variable. Different categories correspond to different configuration items and application scenarios. Select Data Source Variable here. |
Variable Name | The name of the variable used in search statements. Only letters, digits, and _ are supported. |
Variable Alias | (Optional) The display name of the variables on the dashboard. If left empty, the variable name will be used by default. |
Data Source Type | The type of the data source. You can select Log Topic, Metric Topic, or Cloud Product Monitoring. |
Data source Scope | The scope of selectable topics. The default value is All. You can select Custom Filter to set filter conditions and view only the topics that meet the conditions. |
Default log Topic | The data source used by default when a user views the dashboard. |



Form Element | Description |
Type | The category of the variable. Different categories correspond to different configuration items and application scenarios. Select Custom Variable here. |
Variable Name | The name of the variable used in search statements. Only letters and digits are supported. A variable is referenced in the format of ${variable name}. |
Variable Alias | (Optional) The display name of the variables on the dashboard. If left empty, the variable name will be used by default. |
Static variable value | Manually add static variable values. These values will be displayed permanently and support alias configuration. |
Dynamic variable value | After enabling this option, you can select log topics and metric topics. Select a log topic as the variable source: Enter a search and analysis statement, and use the search and analysis results as the optional variable values. For example, to automatically query the values of the remote_addr field in logs as options, the query statement is: * | select remote_addr group by remote_addr limit 100. For syntax, see Syntax Rules.Select a metric topic as the variable source: The variable can be a metric name, a dimension of a metric, or a dimension value, and can be configured as needed. |
Default Value | (Required) The variable value used by default. |




Variable | Description | Format after variable substitution |
${__interval} | The variable automatically adapts to different time granularities based on the time range, and does not specify a unit for the time granularity. | 10s, 15m, 2h, and so on (default format) 10 second, 15 minute, 2 hour, and so on (when the histogram function is used) |
* | select histogram(__TIMESTAMP__,interval ${__interval}) as time, count() as count group by time order by time limit 10000
* | select time_series(__TIMESTAMP__, '${__interval}', '%Y-%m-%dT%H:%i:%s+08:00', '0') as time, count(*) as count group by time order by time limit 10000
rate(MetricName{label=~".*"}[${__interval}])

Variable | Description | Format after variable substitution |
${__range} | Automatically calculates the length of the selected time based on the selected time range. | 10s, 150s, 300s, and so on |
${__range_s} | Automatically calculates the length of the selected time based on the selected time range, with the unit specified as seconds (s) and the result presented without the unit. | 10, 150, 300, and so on |
${__range_ms} | Automatically calculates the length of the selected time based on the selected time range, with the unit specified as milliseconds (ms) and the result presented without the unit. | 10000, 150000, 300000, and so on |
sum_over_time(ReqCount{label=~".*"}[${__range}])
sum_over_time(ReqCount{label=~".*"}[${__range}])/${__range_s}
body_bytes_sent:1344client_ip:127.0.0.1host:www.example.comhttp_method:POSThttp_referer:www.example.comhttp_user_agent:Mozilla/5.0proxy_upstream_name:proxy_upstream_name_4remote_user:examplereq_id:5EC4EE87A478DA3436A79550request_length:13506request_time:1http_status:201time:27/Oct/2021:03:25:24upstream_addr:219.147.70.216upstream_response_length:406upstream_response_time:18upstream_status:200interface:proxy/upstream/example/1
* | select histogram( cast(__TIMESTAMP__ as timestamp),interval 1 minute) as analytic_time, count(*) as pv group by analytic_time order by analytic_time limit 1000
http_status:>=400 | select histogram( cast(TIMESTAMP as timestamp),interval 1 minute) as analytic_time, count(*) as pv_lost group by analytic_time order by analytic_time limit 1000
* | select histogram( cast(TIMESTAMP as timestamp),interval 1 minute) as analytic_time, avg(request_time) as response_time group by analytic_time order by analytic_time limit 1000
${env} variable created in the previous step. Then, charts will use the value of the variable as the data source, that is, Log topic A (production environment).피드백