- Log Stream Overview
- 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
- Reorder Mapped JSON Fields
- Review the Matching JSON Fields and Values
- Add Logic to JSON Field Extraction
- Expressions for Parser Field Extractions and Enrichment Mapping
- Array Log Sample
- Extract Fields Using Regular Expressions
- 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
- Live Tail
- Enrichments
- Event Filtering
Expressions for 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 – When building custom enrichment rules on the Enrichments tab in Log Stream, 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 operate on event data, 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.