Adding a Parsing Rule
You can add one or more parsing rules that define how to parse log events.
Procedure
- Paste the sample log data in the Sample events panel.
-
In the
Parsing rules panel, click
Add new rule to add a new parsing rule.
You can add multiple rules for the same data model.
-
In the
Name field, enter the name of the rule.
The name must contain an alphanumeric character. It can also contain an underscore (_) and hyphen (-).
- To enable the parsing rule, ensure that the slider is set to ON. To disable the rule, click the slider to OFF.
- In the Filter field, enter the filter that is assigned to the parsing rule. All regular expression patterns are supported.
-
From the
Choose parser list, select the type of parser you want to use: Key-Value, JSON, XML, Columnar, Regex, CEF, and Syslog.
Depending upon the selected parser, you must provide additional information in various fields: see Parsers and Field Description.
-
To extract columns based on the parser type, click
Auto generate columns.
All custom columns are extracted in the Manage columns for this rule panel. You can add, edit, or delete custom columns. To add a column, click . To edit any values, click inside the Column and Expression fields. Hover over the row, and the Delete button is displayed on the right side of the row for you to delete the column.
- Column: The name of the column that is displayed in the results. Click in the row to add or update any column name. The content assist shows contextual matches of the existing custom column names for you to select.
Note: Two columns cannot have the same name. Column names are not case sensitive. When defining column names, follow the guidelines described in the COLUMNS Statement section.
- Expression: Define how to map values extracted by parser into defined columns. You can use arithmetic operators and conversion functions when defining an expression. The conversion functions are typically used when you need to define new columns where the expressions for new columns can use conversion functions to convert between data types and combine them using various operators.
- For details about the arithmetic operators, see FILTER Statement.
- For conversion functions, see Predefined EQL Functions.
- The type of expression depends on the parser type: see Parsers and Field Description.
- Column: The name of the column that is displayed in the results. Click in the row to add or update any column name. The content assist shows contextual matches of the existing custom column names for you to select.
-
To refresh the
Parser preview panel to view all extracted columns and their data types that are matched by the corresponding parsing rule, click
.
Each event that matches with the corresponding rule is identified in the same color for easy readability. For custom columns, click in the Type field to change the supported data type. Select the data type from the list.
-
To add the new parsing rule, click
.
The Parsing rules panel displays the newly added rule.
-
To manage columns, click
3. Review configuration or click
located on the right side of the page.
For more information, see Managing Columns.
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.