Skip to main content

Query Syntax

Use our logs UI to quickly search through your log data in seconds.

Query structure

Using logs, you can search through your log data by entering either simple keywords, such as ctrlb , or phrases such as "ctrlb agent", directly into the search field.

Example :

Type a simple text like monotonic in the search query bar, then press enter

You can also combine keywords or phrases with operators to form more complex queries.

To query with other attributes , prefix the attributes with your terms , such as kubernetes_container_name = "celery-adapter"

The user can add attributes in the search query bar in three ways

  1. Type in the attributes
  2. Select the attributes from the 'Attributes section'
  3. With the '+' or '-' buttons in the logs sidebar

General Query rules

Log query rulesComments
Case sensitiveSimple text search, attributes and their values are all case sensitive
Whitespace character

Simple text search added in quotes so whitespace character is clearly visible and considered
kubernetes_container = "server "

Search with attributes

Use attribute searches to narrow the query results to a specific attribute or field.

General operators

The following operators can be used by all types of attributes:

ConditionGeneral operator example
Equal =

Search for log results where the attribute equals the keyword specified. Its case sensitive . Example: The field kubernetes_container_name equals server:

kubernetes_container_name = "server"

Not Equal !=

Search for log results where the attribute is not equals the keyword specified. Its case sensitive. Example: The field kubernetes_container_name not equals server:

kubernetes_container_name != "server"

CONTAINS

Search for log results where the attribute contains the specified keyword. Its case sensitive. Example: The field kubernetes_container_name contains server.

kubernetes_container_name CONTAINS "server"

NOT CONTAINS

Search for log results where the attribute excludes the specified keyword. Its case sensitive. Example: The field kubernetes_container_name not contains server.

kubernetes_container_name NOT CONTAINS "server"

CONTAINS IGNORE CASE

Is used to find substrings in a case-insensitive manner.
kubernetes_container_name CONTAINS IGNORE CASE "seRver"

REGEX

Is used to match complex string patterns based on regular expressions. Example: The field kubernetes_container_name has complex patterns like which starts with "e" and ends with "r"
kubernetes_container_name REGEX "^e.*r$"

NREGEX

Is used to exclude complex strings based on regular expressions. Example: The field kubernetes_container_name dont have pattern which starts with "e" and ends with "r"
kubernetes_container_name NREGEX "^e.*r$"

LIKE

Is used to match simple strings based on regular expressions. Example: The field kubernetes_container_name ends with "r"
kubernetes_container_name LIKE "%r"

NOT LIKE

Is used to exclude simple strings based on regular expressions. Example: The field kubernetes_container_name not ends with "r"
kubernetes_container_name NOT LIKE "%r"