Search logs
Using
In area 2 - where you enter log search information : we support you with 2 search methods: Suggestion mode and Editor mode.
Suggestion mode (default): we will display suggestions for all the fields of the incoming logs for you to choose from (you should choose fields with the suffix keyword so we can always suggest the available value of the logs). field for you). The search will have the most accurate results when you enter the correct Fields <Operator> Value syntax .
For example, to filter log records with HTTP method GET within the last 15 minutes, select query as http_method.keyword = 'GET' and set time range to 15m..
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252FPblhB3xprREdaTuqKVQm%252Fimage.png%3Falt%3Dmedia%26token%3D1e6489b9-ac58-42ff-910f-9466dce67311&width=768&dpr=4&quality=100&sign=6b0a7f2a&sv=1)
Editor mode : by default when you search logs, we will enable Suggestion mode . To use Editor mode, select the icon Edit. When the screen displays Search log entries with Editor mode, you can start entering filters through Editor mode. The syntax for entering a query is similar to Suggestion mode: Fields <Operator> Value. For example, if you enter http_method.keyword = "GET", the system will search for all log records with field http_method.keyword = "GET".
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252FV3pwyzT5TBPArdp9CO6Y%252Fimage.png%3Falt%3Dmedia%26token%3D822c9a79-c94c-4c80-9bc1-a952a4874431&width=768&dpr=4&quality=100&sign=b021d954&sv=1)
After selecting Suggestion mode or importing in Editor mode , you can:
Press Enter or select the icon Search to perform a search for logs.
Select this icon Close if you want to delete all entered/selected filter conditions.
Usage situations
Simple syntax (single query)
To search for logs, you need to select/enter according to the Fields <Operator> Value syntax . In there:
Field : list of fields in the log project you are selecting.
Operator : we provide you with the operations described in the table below:
Value : the value of the field is suggested or you enter yourself.
Math (Operator) | Describe | Illustration |
= | equal some value | host = "ABC" - The system will find log records with field host = "ABC". |
!= | not equal some value | host != "ABC" - The system will look for log records with field types other than "ABC". |
:* | exists is any form | type.keyword :* - The system will find log records where the host field exists. (Existence means the host field appears in the log line, regardless of the value of the host field). |
!:* | not exists | type.keyword !:* - The system will find log records that do not exist in the host field. (Non-existent means the host field does not appear in the log line). |
< | less than some value | @timestamp < "1690772380191" - The system will find log records with timestamp field less than the value 1690772380191. |
> | greater than some value | @timestamp > "1690772380191" - The system will find log records with timestamp field greater than the value 1690772380191. |
<= | less than or equal to some value | @timestamp <= "1690772380191" - The system will find log records with timestamp field less than or equal to the value 1690772380191. |
>= | greater than equal to some value | @timestamp >= "1690772380191" - The system will find log records with timestamp field greater than or equal to the value 1690772380191. |
Complex syntax (complex query with boolean operator)
You can combine multiple Single queries into a Complex query using the syntax Field <Operator> Value <AND/OR> Field <Operator> Value... In which:
Field : list of fields in the log project you are selecting.
Operator : we provide you with the operations described in the table above.
Value : the value of the field is suggested or you enter yourself.
Boolean operator : we provide you the concatenation operations described in the table below:
Concatenation operation (Operator) | Describe | Illustration |
AND | equal some value | http_method.keyword = "POST" AND response_code.keyword = "404" - The system will look for log records with field http_method.keyword = "POST" and field response_code.keyword = "404." |
OR | not equal some value | http_method.keyword = "POST" OR response_code.keyword = "404" - The system will look for log records with field http_method.keyword = "POST" or field response_code.keyword = "404." |
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252FgUWNeAAxHKpwffRwh2kI%252Fimage.png%3Falt%3Dmedia%26token%3Da4011ed5-f599-477f-a2f7-f6a23d491c1e&width=768&dpr=4&quality=100&sign=d83a85d4&sv=1)
Query with for a piece of content
You can search for a piece of content by entering GET directly into the search field. For example, if you enter the text GET, the system will search all log records in which any data field appears this string of characters.
![](https://docs.vngcloud.vn/~gitbook/image?url=https%3A%2F%2F1985221522-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F7rE7M1L7GYcwQzNGd0aB%252Fuploads%252FMg7QVTiqCkJq56uKc6Bk%252Fimage.png%3Falt%3Dmedia%26token%3Ddf651946-b647-4c23-9b02-f38cf45beef2&width=768&dpr=4&quality=100&sign=851e708c&sv=1)
Last updated