Follow the directions below to search logs by keyword and time range:
Enter a keyword, or select a field and keyword from the drop-down list, and click Query.
Logs that contain the keyword are displayed.
If the field you click already exists in the search box, it will be replaced by this newly added one. If the field is added for the first time, fields in the search box are searched using the AND operator.
Log search operations include sharing logs and refreshing logs.
Operation |
Description |
---|---|
Creating quick search criteria |
Click |
Sharing logs |
Click |
Refreshing logs |
You can click
|
Copying logs |
Click |
Viewing context of a log |
Click |
Simplifying field details |
Click |
Unfold/Fold |
Click
![]() NOTE:
Unfold is enabled by default. |
Downloading logs |
Click Direct Download: Download log files to the local PC. Up to 5000 logs can be downloaded at a time. Select .csv or .txt from the drop-down list and click Download to export logs to the local PC. NOTE:
|
Layout |
Move the cursor over
|
JSON |
Move the cursor over NOTE:
Formatting is enabled by default. The default number of expanded levels is 2.
|
Invisible fields ( |
This list displays the invisible fields configured in the layout settings.
|
Search syntax:
Filter |
Description |
---|---|
Exact search by keyword |
LTS searches for logs containing the exact keyword (case-sensitive) that you specify. A keyword is the word between two adjacent delimiters. You can add an asterisk (*) after a keyword, for example, error*, if you are not familiar with delimiters. |
Exact search by phrase |
LTS searches for logs containing the exact phrase (case-sensitive) that you specify. |
&& |
Intersection of search results |
|| |
Union of search results |
AND |
Intersection of search results |
and |
Intersection of search results |
OR |
Union of search results |
or |
Union of search results |
NOT |
Logs that contain the keyword after NOT are excluded. |
not |
Logs that contain the keyword after not are excluded. |
? |
Fuzzy search. The question mark (?) can be put in the middle or at the end of a keyword to replace a character. |
> |
Search for structured long or float fields with values greater than a specified number. For example, num > 10. |
< |
Search for structured long or float fields with values less than a specified number. For example, num < 10. |
= |
Search for structured long or float fields with values equal to a specified number. For example, num = 10. |
>= |
Search for structured long or float fields with values greater than or equal to a specified number. For example, num >= 10. |
<= |
Search for structured long or float fields with values less than or equal to a specified number. For example, num <= 10. |
: |
Search for a specified field (key:value). For example, request_method:GET. Use double quotation marks ("") to enclose a field name or value that contains reserved characters, such as spaces and colons (:). For example, "file info":apsara. |
"" |
Enclose a syntax keyword to convert it into common characters. For example, "and". This "and" means searching for logs that contain this word. It is not an operator. All words enclosed in double quotation marks ("") are considered as a whole. |
\ |
Escape double quotation marks (""). The escaped quotation marks indicate the symbol itself. For example, to search for instance_id:nginx"01", use instance_id:nginx\"01\". |
* |
An asterisk (*) can be placed only after the keyword and can match zero, one, or multiple characters. For example, host:abcd*c. NOTE:
LTS will find 100 words that meet the search criteria in all logs and return these logs. |
in |
Query logs whose field values are in a specified range. Brackets indicate a closed interval, and parentheses indicate an open interval. Numbers are separated with spaces. Example: request_time in [100 200] and request_time in (100 200] NOTE:
Enter in in lowercase and use only long or float fields. |
() |
Specify fields that should be matched with higher priority. Use and, or, and not to connect fields. Example: (request_method:GET or request_method:POST) and status:200 |
key:#"abc def" |
Search for specified field names and values (key:value) after field indexing is configured. |
#"abc def" |
Full text search. LTS splits an entire log into multiple words based on the delimiter you set. Search for logs using specified keywords (field name and value) and rules. |
Operators (such as &&, ||, AND, OR, NOT, *, ?, :, >, <, =, >=, and <=) contained in raw logs cannot be used to search for logs.
Search rules:
For example, if you enter error*, all logs containing error will be displayed and those start with error will be highlighted.
Copy: Copy the field.
Add To Search: Add AND field: value to the search statement.
Exclude from Search: Add NOT field: value to the query statement.
Searching sample