You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Query and analysis
Quickly set up query and analysis statements using tap mode
Copy page
Download PDF
Quickly set up query and analysis statements using tap mode
TLS includes visualized query and analysis interaction components to help you quickly build query and analysis statements. You only need to select concrete fields, operators, and other details, and the system will automatically generate the corresponding query statement.​
Prerequisites​
  • Log data is collected via LogCollector or other methods. For more details, see Collection methods.​
  • Indexes are configured; statistics feature is enabled for fields involved in analysis. For more details, see Configuration Index.​
Steps​
  1. Log in to TLS console.​
  1. Select the region where log service is located from the top navigation bar.​
  1. In the left navigation pane, select Common functions > Query and analysis.​
  1. On Query and analysis page and in the list of left pane, select the specified project and topic.​
  1. On the query and analysis page of the specified log topic, set the time range for the log data.​
  1. Click the tap mode icon.​
  • ​Image​​
  1. Set query condition and click OK.​
  • Click Full text, select the condition judgement and enter the field value. The system will generate a full-text query condition based on your settings.​
  • Click a field, select the condition judgement, and enter the field value. The system will generate a key-value query condition based on your settings.​
  • After you set full-text or key-value query condition and select Phrase query, the system will generate the corresponding phrase query condition. For details about phrase queries, see Query logs via phrase query.​
  • ​Image​​
  1. (Optional) Click Add analysis statement to add a SELECT statement.​
  1. After confirming the correctness of your query and analysis condition, click Search.​
  • ​Image​​
  • After setting the query and analysis condition, click the filter icon to view the corresponding statements for these conditions.​
Syntax description​
Logical operator​
​
Logical operator​
Description​
And​
Corresponds to the AND operator in the query syntax. For details, see Operators.​
or​
Corresponds to the OR operator in query syntax. For details, see Operators.​
​
Operators​
Notice​
When using the include or exclude operators, specify either the full keyword or partial characters with wildcards (* or ?).​
  • If you specify full keywords, it means you choose exact search.​
  • If you specify partial characters and wildcards (* or ?), it means you choose fuzzy search, such as includes cn*.​
  • If you choose fuzzy search, wildcards are required to added. For details, see Query accuracy.​
​
Query methods​
Field type​
Operators​
Full-text query​
text​
Include, exclude​
Key-value query​
text​
Include, exclude, exist, not exist, option included, none of the options included.​
​
long​
=, >=, >, <=, <, exist, within the specified range, outside the specified range, not exist, option included, none of the options included.​
​
double​
=, >=, >, <=, <, exist, within the specified range, outside the specified range, not exist, option included, none of the options included.​
​
Related operations​
  • After setting query conditions, you can click the icon below to quickly enable or disable specific query conditions.​
  • ​Image​​
  • After setting query conditions, you can click the icon below to quickly set the inclusion or exclusion relationship for query conditions.​
  • ​Image​​
Example value​
Example 1​
  • Scenario: Query logs containing error and warning.​
  • Interaction component configuration​
  • ​Image​​
  • Query statements​
  • ​
    warning AND error​
    ​
  • Query result​
  • ​Image​​
Example 2​
  • Scenario: Query logs where the URL field contains PutLogs.​
  • Interaction component configuration​
  • ​Image​​
  • Query statements​
  • ​
    URL:PutLogs​
    ​
  • Query result​
  • ​Image​​
Example 3​
  • Scenario: Count the number of requests with a status of 200.​
  • Interaction component configuration​
  • ​Image​​
  • Query statements​
  • ​
    status:200 | SELECT COUNT(*) ​
    ​
  • Query and analysis results​
​Image​​
Example 4​
  • Scenario: Query request IDs that start with d581.​
  • Interaction component configuration​
  • ​Image​​
  • Query statements​
  • ​
    ReqID: d581* | SELECT DISTINCT ReqID​
    ​
  • Query and analysis results​
  • ​Image​​
​
Last updated: 2026.01.05 18:38:41