Search operators process data in meaningful ways and provide logic to queries. This page lists the available search operators in the Sumo Logic search query language.
In this section, we'll introduce the following concepts:
Calculates the cumulative sum of a field.
The as operator, typically used in conjunction with other operators, can also be used standalone to rename fields or to create new constant fields.
Use this to look up an Autonomous System Number (ASN) and organization name by IP address.
The backshift operator helps you compare values as they change over time.
The base64Decode operator takes a base64 string and converts it to an ASCII string.
The base64Encode operator takes an ASCII string and converts it to a base64 string.
The bin operator assigns output results to user defined bins.
You can use the cat operator to view the contents of a lookup table. Not supported in live dashboards or scheduled searches.
Sumo Logic's three CIDR operators work with Classless Inter-Domain Routing, notation to narrow the analysis of IPv4 networks to specific subnets.
The concat operator allows you to concatenate or join multiple strings, numbers, and fields into a single user-defined field.
Compares string values of two parsed fields and returns a boolean result based on whether the second field's value exists in the first.
Converts a long value of 16 or fewer digits to a hexadecimal string using Two's Complement for negative values.
The dedup operator removes duplicate results. You have the option to remove consecutively and by specific fields.
The diff operator calculates the rate of change in a field between consecutive rows.
The fields operator allows you to specify which fields to display and their order in the results of a query.
The fillmissing operator allows you to specify groups that should be represented in data output.
Use the filter operator to filter the output of a search based on the filtering criteria of a child query.
The format operator allows you to format and combine data from parsed fields.
Formats dates in log files as a string in a different format, such as U.S. or European date formatting.
Geo Lookup (Map)
Sumo Logic can match a parsed IPv4 or IPv6 address to its geographical location on a map.
Sumo Logic can match a parsed IPv4 or IPv6 address to its geographical location on a map chart.
The hash operator uses a cryptographic hash algorithm to obscure data into a random string value.
Returns the distance between latitude and longitude values of two coordinates in kilometers.
The hexToAscii operator converts a hexadecimal string to an ASCII string.
Converts a hexadecimal string of 16 or fewer characters to a long data type using Two's Complement for negative values.
These expressions are used to evaluate a condition as either true or false, with values assigned for each outcome.
The in operator returns a Boolean value: true if the specified property is in the specified object, or false if it is not.
Converts an Internet Protocol version 4 (IPv4) IP address from the octet dot-decimal format to a decimal format.
Checks a string and returns a boolean value.
Checks if a string contains no characters and is only whitespace.
Checks if a string contains no characters, is only whitespace, and is null.
The isNumeric operator checks whether a string is a valid Java number.
The isPrivateIP operator checks if an IPv4 address is private and returns a boolean.
The isPublicIP operator checks if an IPv4 address is public and returns a boolean.
The isReservedIP operator checks if an IPv4 address is reserved as defined by RFC 5735 and returns a boolean.
The isValidIP operator checks if the value is a valid IP address.
The join operator combines records of two or more data streams.
The length operator returns the number of characters in a string.
The limit operator reduces the number of raw messages or aggregate results returned.
Returns one or more fields from a lookup table hosted by Sumo Logic and add the fields to the log messages returned by your query.
Use the lookupContains operator to determine whether a key exists in a lookup table. It will return a boolean value.
Maps data in your log messages to meaningful information saved in Sumo or on an HTTPS server.
Uses Luhn’s algorithm to check message logs for strings of numbers that may be credit card numbers and then validates them.
Manually cast data to string or number
Most data in Sumo Logic is stored as a string data type. Metadata fields are stored as string data and parsed fields are by default parsed as string type data.
The matches operator can be used to match a string to a wildcard pattern or an RE2 compliant regex.
The now returns the current epoch time in milliseconds.
Converts a field to a double value, which is twice as accurate as a float value.
Identifies values in a sequence that seem unexpected and would trigger an alert/violation.
Uses a series of time-stamped numerical values to predict future values.
The queryEndTime() operator returns the end time of the search time range in milliseconds.
The queryStartTime() operator returns the start time of the search time range in milliseconds.
The queryTimeRange() operator returns the time duration for the query being executed in milliseconds.
The replace operator allows you to replace all instances of a specified string with another string.
The rollingstd operator finds the rolling standard deviation of a field, allowing you to identify changes over time.
Allows you to save the results of a query to a lookup table you've already created.
The save (classic) operator works with the classic Lookup Tables feature.
Uses an extracted value from one log message to find correlating values in log messages from other systems.
Calculates the rolling (or moving) average of a field, measuring the average of a value to "smooth" random variation.
The sort operator orders aggregated search results.
The substring operator allows you to specify an offset that will output only part of a string, referred to as a substring.
Correlates CrowdStrike's threat intelligence data based on IP addresses from your log data, helping you detect threats in your environment.
The timeslice operator aggregates data by time period, so you can create bucketed results based on a fixed interval.
Timeslice Join Results
When you gather data using a join operator, you can slice data by time period using the timeslice operator.
The toLowerCase operator takes a string and converts it to all lower case letters.
Use the top operator with the sort operator to reduce the number of sorted results returned.
The topk operator allows you to select the top values from fields and group them by fields.
The total operator inserts the sum of a set of fields into every row of the set.
The tourl operator provides you the ability to assign a short name that describes the URL.
The trace operator acts as a highly sophisticated filter to connect the dots across different log messages.
Similar to a Pivot Table in Excel, the transpose operator allows you to take a list and turn it into a table in the Aggregates tab.
The trim operator eliminates leading and trailing spaces from a string field.
The urldecode operator decodes a URL you include in a query, returning the decoded (unescaped) URL string.
The urlencode operator encodes the URL into an ASCII character set.
The where operator allows you to filter results based on a boolean expression.