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
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.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.Free-text Search
Bare words are automatically treated as free-text matches against the raw event content. For example, typingerror 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:
errorusername AND (500 OR 404)host:127.0.0.1
$ 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 typingerror 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
Boolean Operators
Boolean operators combine the result of other expressions that return a value ofTRUE, FALSE or UNKNOWN.
Comparison Operators
Comparison operators compare one expression or value with another, and return a value ofTRUE, FALSE 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 level1 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 TypesUsing Quotes Correctly
STRING Literals Always use single quotes around values:"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 attributeduration=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.
. (any character), \d (any number), \s (any whitespace), and [xyz] (any character that is either x, y 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]llomatches any of"hallo", "hello", "hollo" -
(?i)catmatches"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.
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: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:
- the timestamp,
- the component name,
- the process id,
- an unstructured message.
Named capture groups may only be used:
-
In aggregate functions, e.g.,
count,min,max. - In the group by clause.
- For column selection.
REPORT:
- the number of steps,
- the report number,
- the total calories burned,
- the altitude.
(?<message>.*?) element to
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)

