Skip to main content
Bronto uses a single search syntax for filtering and analyzing your data. It combines SQL-style expressions with autocomplete suggestions in the search bar, so you can build queries interactively or write them directly. Bronto supports a subset of SQL for searching and analyzing your data. ⚠️ This is not full ANSI SQL — advanced features such as subqueries, joins, and complex expressions are not supported. The focus is on simple WHERE-style filtering with comparison, boolean, and pattern-matching operators. The search bar corresponds to the WHERE clause of a SELECT SQL statement, and can be used to filter the results of your query. For example, you can search your firewall logs for users accessing a specific destination with
which retrieves all events that have an attribute named direction with a value equal to 'outbound' and an attribute destination_address equal to '52.214.86.65'.
The single quotes in the above example are important, as otherwise “outbound” would be interpreted as an attribute rather than a string value.
Bronto automatically parses the attributes in your data, regardless of whether that data is structured, semi-structured, or completely unstructured. You can view the attributes for an event in the inspector when you click on an event.

Autocomplete

When you click into the search bar, Bronto shows an interactive dropdown with keys and values found in your data. You can use autocomplete to build valid search expressions more quickly, especially when you do not want to type field names or values manually. Autocomplete works within the same search syntax described on this page. There is no separate search mode to switch to. Bare words are automatically treated as free-text matches against the raw event content. For example, typing error matches events that contain “error” in their text. Bronto also automatically converts simple free-text and attribute-style searches into equivalent search syntax, so existing quick searches continue to work without needing a separate mode. For example:
  • error
  • username AND (500 OR 404)
  • host:127.0.0.1
Resource attributes prefixed with $ are excluded from free-text matching. Reference the key explicitly if you want to search them.

Reserved Attributes

Attributes that begin with @ are reserved attributes that contain some special information:

Implicit Expansion of Bare Words

To make free-text search queries simple and concise, Bronto provides a syntactic sugar that is not part of standard SQL. This means that simply typing error in the search bar matches all events that contain “error” in their text. Specifically: any character string that appears on its own is automatically expanded into an ILIKE expression that checks whether the string appears anywhere in the event. To search for any event that contains "username" as well as either "500" or "404", you can query with
In this example, the query filter is automatically expanded to
Quoted and unquoted strings behave the same way in this context, so quotes may be omitted (unless the search pattern contains special characters).

Boolean Operators

Boolean operators combine the result of other expressions that return a value of TRUEFALSE or UNKNOWN.

Comparison Operators

Comparison operators compare one expression or value with another, and return a value of TRUEFALSE or UNKNOWN.

Operator Precedence

When an expression has multiple operators, the operator precedence determines the sequence of operations. Operators have the precedence level shown in the table below, with level 1 being the highest precedence, and 4 being the lowest. An operator with a higher precedence is evaluated before an operator with a lower precedence. Use parentheses to override the defined operator precedence in an expression.

Quoting & Escaping

In search syntax, different types of quotes serve distinct purposes to ensure your queries work correctly. Quote Types

Using Quotes Correctly

STRING Literals Always use single quotes around values:
Attributes Wrap attributes in double quotes:
Unquoted strings of characters are always interpreted as attributes. However, if your attribute contains any of the following special characters, you must wrap it in double quotes:
For example:
In this example, "request-time" refers to an attribute that includes a dash (-).

Escaping Quotes

Quotation marks (both single ' and double ") can be escaped by doubling them up, for example 'O''Brien' is a STRING literal with an apostrophe (O'Brien).

Data Types & Conversions

Supported Data Types

Any expression in a query has a related data type which defines how they will be treated by operators.

Implicit Data Type Conversions

Bronto automatically converts a value from one data type to another when such a conversion makes sense, for example, if your event has an attribute duration=0.1291 it will match both duration<1 (LONG literal) and duration<'1' (STRING literal). The rules for implicit data type conversion for binary operators are as follows:

String & Text Functions

String functions perform operations on a string input value and return a string or numeric value. Bronto supports the following string functions.

Regular Expressions

Regular expression operators are an early access feature and are disabled by default. Contact Support if you’d like to enable this feature for your account. Use is subject to our fair use policy.
Regular expressions provide a powerful and flexible way to perform pattern matching. Compared to simple string matching, regex provides rich wildcards such as . (any character), \d (any number), \s (any whitespace), and [xyz] (any character that is either xy or z), and repetition operators: * matches a sequence of zero or more string; + matches one or more; ? matches zero or none. For example, the regex cat* matches cat followed by any characters (or none at all). For example,
  • cat.* matches "catapult"
  • cat.* matches "The cat sat"
  • h[aeiou]llo matches any of "hallo", "hello", "hollo"
  • (?i)cat matches "cat""CAT""cAt" ((?i) is the case-insensitive inline modifier)
  • [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} matches email addresses.
The precise regex syntax supported by Bronto is RE2, for which you can find the specification here. RE2 does not support some features provided by other regex variants (e.g., PCRE), such as positive and negative lookahead/lookbehind. When using regex to query your data, the regex pattern does not need to match the entire event exactly. For example, the pattern colou?r will match the event “My favourite colour is red” - it is not necessary to write .*colou?r.*.

Attribute Parsing With Regex Capture Groups

If Bronto has not automatically parsed the attributes in your data (for example, if you have an unstructured custom log format) and you have not set up the GROK parsing rules for your data source, then you can use named regex capture groups to parse attributes in your data. A named capture group is declared by using the following syntax:
where PATTERN is a regex pattern, and name denotes the attribute you want to parse. For example, suppose you are working with this unstructured custom log:
Each event has some structure - there are individual fields delimited by the ”|” character, specifically:
  1. the timestamp,
  2. the component name,
  3. the process id,
  4. an unstructured message.
We can parse these attributes at query-time by running the following regex query:
Named capture groups may only be used:
  1. In aggregate functions, e.g., countminmax.
  2. In the group by clause.
  3. For column selection.
Named capture groups cannot be reused as part of the query filter, for example it is not possible to write a query like
Now suppose that we are specifically interested in the events which read REPORT:
which contain additional information on:
  1. the number of steps,
  2. the report number,
  3. the total calories burned,
  4. the altitude.
And suppose we want to find the maximum altitude across some time period. First we could restrict the filter to match only the events which contain “REPORT”:
And then we could use nested capture groups to further parse the message, by changing the (?<message>.*?) element to
so that the full query is now
With this regex filter, the new attributes “timestamp”, “report_num”, “total_cals_burned”, and “altitude” become available, and we can easily apply a max(altitude) function to our query.

Limits & Restrictions

All queries in Bronto are subject to the following limits:
  • Maximum length: 16,000 characters
  • Maximum expressions: 400 (including boolean expressions, comparisons, and standalone tokens)