Field Extraction for Source Rules
This page describes how to use Auto and Manual Field Extraction to configure Log Analytics source rules. Field Extraction uses regular expressions to identify and format the fields for your Log Analytics data.
Auto Field Extraction enables you to upload a sample log file and select fields for extraction. The necessary regular expressions are automatically generated and highlighted in your sample messages. You can fine-tune the generated regular expressions using Refiner Sample and Counter Sample log messages.
Manual Field Extraction enables you to upload a sample log file and enter your own regular expressions to define fields and associate the fields with a data type.
Definitions
- Source Rule: a set of configuration settings for extracting analytics data from log files. You create source rules using the Centralized Log Management UI in the Controller. Source rules are stored in the Controller data store and periodically synced with the Analytics Agent. See Configure Log Analytics Using Source Rules.
- Sample File: a representative log file uploaded to the Controller that provides a way to test and fine-tune your log file source rules.
- Definer Sample: a specific log message selected from the sample log file used to define the fields that you want to extract from the log messages.
- Refiner Sample: an additional log message used to revise the auto-generated regular expression created in the Definer Sample step. The Refiner sample helps capture fields that were missed in the initial step.
- Counter Sample: an additional log message used to eliminate false positives while extracting the fields as defined in the Definer or Refiner steps.
Auto Field Extraction
This section describes how to use Auto Field Extraction to extract fields from your log files.
To specify field extraction using a Definer Sample log message:
Manual Field Extraction
You can specify your own regular expressions if needed using Manual Field Extraction.