Skip to main content

Log StreamLog Stream Guide

Select Tokenized JSON Fields from the Values in the Sample Log

To select fields from the already tokenized values in the sample log:

  1. In the Sample Log Lines section at the bottom of the screen, click on one of the tokenized values highlighted in grey. A Map Token to Event Field dialog box opens.

    sample-log-line-token.png
  2. In the dialog box, use the drop down menu to select the CIM field you want to map the tokenized value to. The options are listed according to whether they are core, detection, or informational fields for the specified activity type. You can also click + New field at the bottom of the list and create a custom field.

  3. Click Map Extraction to save the mapping.

    map-extraction.png

    Check on the following after you save the mapping:

    • In the table of mapped JSON fields at the top of the screen, ensure that a new row has been added. It should include the tokenized value you selected, the CIM field you mapped it to, and the JSON path expression that defines it.

    • In the Sample Log Lines section at the bottom of the screen, ensure that the mapped field extracts the appropriate value from the sample log. Mapped values appear highlighted in various colors.

  4. Optionally, if you want to apply conditions to the way a field value from the log is extracted for mapping to the selected CIM field, insert a logical condition in the Extraction Condition column.

    For more information about implementing this type of logic, see Add Logic to JSON Field Extraction.

  5. Optionally, you can also use the Substring Regex column to define a condition that extracts a specific value from within a string and maps only that value to a CIM field.

    For more information about implementing this type of logic, see Add Logic to JSON Field Extraction.

  6. Repeat the process to select another tokenized value from the sample log, select a CIM field, and click Map Extraction to save the field mapping.

  7. Continue to select and map tokenized values until you have mapped all of the core fields and any of the detection, informational, or custom fields you think will be useful.

  8. After you have selected all of the necessary fields for extraction, ensure the fields are in the correct order, review the matching event type fields and log values, then continue building your custom parser by configuring event builders.