Splunk® Enterprise

Knowledge Manager Manual

Download manual as PDF

Download topic as PDF

Configure inline extractions

Inline field extractions are field extractions that are configured within props.conf.You can have one regular expression per field extraction configuration. See About configuration files in the Admin manual.

Use inline field extractions when you:

  • Have one regular expression per field extraction configuration
  • Have a simple setup with one regular expression, and you want to extract multiple fields
  • Want to create a new field by configuring an extraction

Inline extractions and the search-time operations sequence

Search-time operations order

Inline field extractions come first in the search-time operation sequence.

Restrictions

Because inline field extractions happen first in the search-time operation sequence, they cannot reference fields that are derived and added to events by other search-time operations.

For more information

For more information, see The sequence of search-time operations.

Configure an inline search-time field extraction

Inline search-time field extractions use the EXTRACT extraction configuration in props.conf. Each EXTRACT extraction stanza contains the regular expression to extract fields at search time, and other attributes that govern the way those fields are extracted.

Prerequisites
Review the following topics.


Caution: Do not edit files in $SPLUNK_HOME/etc/system/default/. A subsequent upgrade or migration will overwrite your configuration and cause Splunk software to fail.

Steps

  1. Identify the source type, source, or host that provide the events that your field should be extracted from.
    All extraction configurations in props.conf are restricted to a specific source, source type, or host.
  2. Configure a regular expression that identifies the field in the event.
  3. Follow the format for the EXTRACT field extraction type to configure a field extraction stanza in props.conf that includes the host, source, or sourcetype for the event and the regular expression that you have configured.
  4. If your field value is a subtoken, you must also add an entry to fields.conf.
  5. Restart Splunk Enterprise.

EXTRACT field extraction configuration syntax

<spec> options

[<spec>]
EXTRACT-<class> = [<regular_expression>|<regular_expression> in <string>]

<spec>
Syntax: <source type>| host::<host> | source::<source> | rule::<rulename>| delayedrule::<rulename>

<spec> Description
<source type>
Source type of an event
host::<host>
Host for an event
source::<source>
Source for an event
rule::<rulename>
Unique name of a source type classification rule.
delayedrule::<rulename>
Unique name of a delayed source type classification rule.

Before using rule or delayedrule, try generating a new source type based on the source seen by Splunk software.

EXTRACT configuration attributes

EXTRACT-<class> Description
<class>
A unique literal string that identifies the namespace of the field you're extracting. <class> values do not have to follow field name syntax restrictions and are not subject to key cleaning.
<regular_expression>
Required to have named capturing groups. Each group represents a different extracted field. When the <regular_expression> matches an event, the named capturing groups and their values are added to the event.
<regular_expression> in <source_field>
Matches a regular expression against the values of a specific field. Otherwise it matches all raw event data.
<regular_expression> in <string>
When <string> is not a field name, change the regular expression to end with [i]n <string> to ensure that Splunk software does not match <string> to a field name.
PREVIOUS
About regular expressions with field extractions
  NEXT
Configure advanced extractions with field transforms

This documentation applies to the following versions of Splunk® Enterprise: 6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.0.7, 6.0.8, 6.0.9, 6.0.10, 6.0.11, 6.0.12, 6.0.13, 6.0.14, 6.1, 6.1.1, 6.1.2, 6.1.3, 6.1.4, 6.1.5, 6.1.6, 6.1.7, 6.1.8, 6.1.9, 6.1.10, 6.1.11, 6.1.12, 6.1.13, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.2.5, 6.2.6, 6.2.7, 6.2.8, 6.2.9, 6.2.10, 6.2.11, 6.2.12, 6.2.13, 6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.3.4, 6.3.5, 6.3.6, 6.3.7, 6.3.8, 6.3.9, 6.3.10, 6.3.11, 6.4.0, 6.4.1, 6.4.2, 6.4.3, 6.4.4, 6.4.5, 6.4.6, 6.4.7, 6.4.8, 6.5.0, 6.5.1, 6.5.1612 (Splunk Cloud only), 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.6.0, 6.6.1, 6.6.2, 6.6.3


Was this documentation topic helpful?

Enter your email address, and someone from the documentation team will respond to you:

Please provide your comments here. Ask a question or make a suggestion.

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters