Splunk Search

permanently extracting a field

moe44688
New Member

Hi, I am using regex to extract a field. However, I need to make it permanent so that I don't have use regex in future searches. The regex is:

 rex field=message "(?<Codes>(\w{5,3}\s+)+"

I would really appreciate any help! I hope I've provided sufficient information.

Tags (1)
0 Karma

sundareshr
Legend
0 Karma

jkat54
SplunkTrust
SplunkTrust

You can do a search time field extraction by editing the props.conf in the splunk app you're searching within.

[sourcetypeName]
...
extract-codes = (?<Codes>(\w{5,3}\s+)+) in message

if that doesnt work, remove "in message".

In effect, this is what the field extractor sundareshr has mentioned does. Just keep in mind the search time extractions are specific to the splunk app you are in when you run your search/alert/report.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...