- Log Stream Overview
- Supported Vendors and Products
- Parser Manager
- Parsers Overview
- View Parser Details
- Create a Custom Parser
- Import Sample Logs
- Define a Subset of the Sample Logs
- Add Conditions
- Add Basic Parser Information
- Extract Event Fields
- Extract Mapped JSON Fields
- Select JSON Fields from a List of Key/Value Pairs
- Select Tokenized JSON Fields from the Values in the Sample Log
- Manually Enter JSON Path Expressions
- Sample JSON Path Expressions for Manual Entry
- Reorder Mapped JSON Fields
- Review the Matching JSON Fields and Values
- Add Logic to JSON Field Extraction
- Expressions for JSON Parser Field Extractions and Enrichment Mapping
- Extract Fields Using Regular Expressions
- Reserved Fields
- Extract Mapped JSON Fields
- Add Event Builder Rules
- Review and Save Parser
- Manage Existing Custom Parsers
- Tokenize Non-Standard Log Files
- Customize a Default Parser
- Duplicate a Parser
- Enable or Disable Parsers
- Parser Updates
- Live Tail
- Enrichments
- Event Filtering
Expressions for JSON Parser Field Extractions and Enrichment Mapping
The charts below describe the functional expressions that can be used to configure rule conditions in Log Stream. There are two situations in Log Stream where configuring these conditions is necessary:
Parser Field Extraction – During parser creation in Log Stream, when defining how a parser should extract value from a raw log, you can use the expressions below to build conditions that describe which fields to extract value from. Because parsers are operating on raw logs, these expressions cannot reference the common information model (CIM) fields directly. Instead, for extraction conditions, the expressions must be written using JSON xpath syntax. For example:
add($.eventVersion,1)Enrichment Rules – After parsing log data, you might want to modify the parsed fields further or use the parsed data to create new fields. On the Enrichments tab in Log Stream, you can define enrichment rules that accomplish this. When building custom enrichment rules, you can use the expressions below to build conditions that will map field data from raw logs to Exabeam common information model (CIM) fields. Because enrichment rules are operating on event data that's already parsed, the expressions can reference the CIM field names directly, with no special syntax. For example:
add(bytes_in, bytes_out)
Important
The examples below reference CIM fields directly. Remember that if you're using these conditions to build expressions for field extractions when defining a parser, you must use the JSON xpath syntax and preface field names with $. characters.
General Expressions
These expressions perform general operations such as mathematical calculations or basic data evaluation.
Expression | Description | Inputs | Example / Result |
|---|---|---|---|
| Returns the sum of numerical arguments. |
| Example:
Result: Returns the sum of the |
| Returns the lowest integer value that is greater than or equal to the argument |
| Example:
Result: For a |
| Returns a value of An alternate form of |
| Example:
Result: Returns the value of the |
| Returns a value of An alternate form of |
| Example:
Result: Returns the value of the |
| Returns the value of the first expression that evaluates to non-empty and non-zero. |
| Example:
Result: Returns the value of either the |
| Returns the greatest integer value that is less than or equal to the argument, |
| Example:
Result: For a |
| Formats arguments according to a specified format string. |
| Example:
Result: Returns |
| Converts a hexidecimal number to an integer. |
Both " | Example:
Result: Returns a value of |
| Confirms that the value of argument |
| Example:
Result: Returns a value of |
| Returns the maximum of arguments as numbers |
| Example:
Result: Returns whichever is the larger value, the |
| Returns the minimum of arguments as numbers. | x = an argument | Example:
Result: Returns whichever is the smaller value, the |
| Returns a value that is the product of multiplying all the arguments listed. An alternate form of |
| Example:
Result: Returns a value that is half of the |
| Returns a value that is the product of multiplying all the arguments listed. An alternate form of |
| Example:
Result: Returns a value that is half of the |
| Returns a value of An alternate form of |
| Example:
Result: Returns a value that is twice the value of the |
| Returns a value of An alternate form of |
| Example:
Returns a value that is twice the value of the |
| If the Boolean expression |
| Example:
Result: If the |
| Return the value of the argument, |
| Example:
Result: Returns the value of the |
| Returns the value of |
| Example:
Result: Returns the value of the |
| A cast operation that converts the specified expression to a Boolean value. |
|
Converts the value of the |
| A cast operation that converts the specified expression to a numerical value. |
| Example:
Results: Converts the value of the |
| A cast operation that converts the specified expression to a string value. |
| Example:
Result: Converts the value of the |
String Expressions
These expressions can be used to manipulate or evaluate string data.
Expression | Description | Inputs | Example / Result |
|---|---|---|---|
| Confirms whether a string value begins with the specified prefix. An alternate form of |
| Example:
Result: Returns a value of |
| Confirms whether a string value begins with any of the specified prefixes. An alternate for of starts |
| Example:
Result: Returns a value of |
| Returns the value from a string, up to |
| Example:
Result: For a host field with a value or |
| Returns the value from a string, after |
| Example:
Result: In an email field with a value of |
| Concatenates any number of specified values, treated as strings. |
| Example:
Result: Returns a value in the pattern of |
| Confirms whether string |
| Example:
Result: Returns a value of |
| Confirms whether string |
| Example:
Result: Returns a value of |
| Returns a value with the first |
| Example:
Result: Returns the value of the |
| Returns a value with the last |
| Example:
Result: Returns the value of the |
| Confirms whether the value of string |
| Example:
Result: Returns a value of |
| Confirms whether the value of string |
| Example:
Result: Returns a value of |
| Returns the |
| Example:
Result: For a |
| Returns the position of the last occurrence of pattern delimiter, |
| Example:
Result: For a |
| Returns the smallest common prefix of a list of specified strings. This function is case-sensitive. An alternate form of |
| Example:
Result: Returns the prefix |
| Returns the smallest common suffix of a list of specified strings. This function is case-sensitive. An alternate form of |
| Example:
Result: Returns the suffix |
| Returns the smallest common prefix of a list of specified strings. This function is case-sensitive. An alternate form of |
| Example:
Result: Returns the prefix |
| Returns the smallest common suffix of a list of specified strings. This function is case-sensitive. An alternate form of |
| Example:
Result: Returns the suffix |
| Returns the length of string |
| Example:
Result: Returns the length of the value in the |
| In string |
| Example:
Result: Replaces the substring ' |
| In string |
| Example:
Result: Removes all the instances of substring ' |
| In string |
| Example:
Result: Removes the first instance of substring ' |
| Returns a substring value from string |
| Example:
Result: Returns the portion of the |
| Confirms whether a string value begins with the specified prefix. An alternate form of |
| Example:
Result: Returns a value of |
| Confirms whether a string value begins with any of the specified prefixes. An alternate form of |
| Example:
Result: Returns a value of |
| Returns the value of string |
| Example:
Result: Returns the value of the |
| Returns the value of string |
| Example:
Result: Returns the value of the |
| Return only the first |
| Example:
Result: Returns the first |
| Return only the last |
| Example:
Result: Returns the last |
| Return an all lowercase representation of string |
| Example:
Result: Returns the value of the |
| Return an all uppercase representation of string, |
| Example:
Result: Returns the value of the |
| Return a version of the string, |
| Example:
Result: Returns a stripped version of the value in the |
Boolean and Conditional Expressions
These expressions can be used to perform logical operations and evaluate conditions.
Expression | Description | Inputs | Example / Result |
|---|---|---|---|
| Confirms that all of the included Boolean expressions evaluate to |
| Example:
Result: A value of
|
| Confirms that none of the specified string values are null. |
| Example:
Result: Returns a value of |
| Returns one value if the expression evaluates to |
| Example:
Result: If the |
| Confirms whether the expression is found in any of the specified list of values. |
| Example:
Result: Returns a value of |
| Confirms that an expression is not true. |
| Example:
Result: Returns a value of |
| Confirms that any of the included Boolean expressions evaluate to |
| Example:
Result: A value of
|
IP and Network Expressions
These expressions are specific to IP address evaluation.
Expression | Description | Inputs | Example / Result |
|---|---|---|---|
| Confirms that a string, |
| Example:
Result: Returns a value of |
| Confirms that a string, |
| Example:
Result: Returns a value of |
| Confirms that a string, |
| Example:
Result: Returns a value of |
| Confirms that a string,
An alternate form of |
| Example:
Result: Returns a value of |
| Confirms that a string,
An alternate form of |
| Example:
Result: Returns a value of |
| Confirms that a string,
An alternate form of |
| Example:
Result: Returns a value of |
| Confirms that a string,
An alternate form of |
| Example:
Result: Returns a value of |
| Confirms that a string,
An alternate form of |
| Example:
Result: Returns a value of |
| Confirms that a string,
An alternate form of |
| Example:
Result: Returns a value of |
| Confirms that a string,
An alternate form of |
| Example:
Result: Returns a value of |
| Confirms that a string,
An alternate form of |
| Example:
Result: Returns a value of |
| Confirms that a string,
An alternate form of |
| Example:
Result: Returns a value of |
| Confirms that a string,
An alternate form of |
| Example:
Result: Returns a value of |
Context Expressions
These expressions are specific to contextual data or operations.
Important
Inputs for these expressions are case-sensitive. In order for the expression to return a result of true, the value in the key column must exactly match the case-sensitivity used in the context table itself.
Expression | Description | Inputs | Example / Result |
|---|---|---|---|
| Returns the value of an attribute column, |
| Example:
Where:
Result: Looks in the key column of the |
| Confirms whether a context table |
| Example:
Result: Returns a value of |
Note
Finding the attribute_id for the A Input
The A input for the GetContextAttribute expression must be represented by the attribute_id of a column in the context table, and not by the display name in the column header in the Context Management UI. The mapping of attribute_id to column names is not available in the Context Management UI.
To find an attribute_id, navigate to the GET /context-management/v1/tables API endpoint in the Exabeam Developers Portal. Run this API to return a list of metadata for the context tables in your environment, including attribute mapping. Select the appropriate attribute_id for the column you want to represent in the A input for the GetContextAttribute expression.
For information about this API endpoint, and for links to other resources about running Exabeam public APIs, see Context Management APIs.
Native Field Extraction Expressions
Important
The expressions in this section can be used only to define conditions when building a custom enrichment rule. They cannot be used to support custom parser creation.
These expressions each represent a dedicated extraction function that can be used to extract and return a single, specific, sub-field. They support data extraction from complex fields. Typically, extracting complex field values requires multiple manual Regex patterns. For example, breaking a full file path, like /usr/local/bin/app.sh, into folder, filename, and extension, might require a generic, multi-purpose extraction expression plus enrichers to filter for a specific sub-field value. The expressions below call single functions that combine these procedures to extract the sub-field directly.
When you add these expressions to an enrichment rule condition, it calls the corresponding function to locate and accurately return the desired value.
Expression | Description | Inputs | Examples → Outputs |
|---|---|---|---|
| Returns the directory portion of a file path. If no file path is present, an empty string is returned. |
| Examples → Outputs
The function handles forward slashes (/) and backward slashes (\) typically found in universal naming convention (UNC) paths. |
| Returns the filename, with extension, from a file path. If no filename is present, an empty string is returned. |
| Examples → Outputs
|
| Returns the extension, without the leading dot, from a file path. If no extension is present, an empty string is returned |
| Examples → Outputs
|
| Returns the registered or private domain from a URL. |
| Examples → Outputs
This function is aware of the Public Suffix List to identify domain boundaries in multi-level suffixes. For example, it can recognize that the registered web domain is |
| Returns the top domain or public suffix from a URL. For IP addresses, an empty string is returned. |
| Examples → Outputs
|
| Returns the subdomain portion of a URL. If no subdomain is present, an empty string is returned. |
| Examples → Outputs
|
| Returns the path portion of a URL. If no path is present, an empty string is returned. |
| Example → Output
|
| Returns the query string only, without |
| Example → Output
|
| Returns the full URI (file path plus the query) from a URL. |
| Example → Output
|
| Returns the directory from process path. If no directory is present, an empty string is returned. |
| Examples → Outputs
|
| Returns the process name, with executable extension (if present), from a process path. If no process name is present, an empty string is returned. |
| Examples → Outputs
|
| Returns only the normalized operating service name, with no version. If no pattern is matched an empty string is returned. |
| Examples → Outputs
|
| Returns only the major version number of the operating service. If no version is present, an empty string is returned. |
| Examples → Outputs
|