Splunk Search

extract field across sourcetypes

aniketb
Path Finder

Hi,

I have a regex to extract a field. I need unique count of those.
During exploring I found that the extracted field is limited to that sourcetype.
My query spans across 10-12 sourcetypes. Should I just keep adding the field to all sourcetypes?

PS: I'm just a Splunk user. I don't know where .conf files are, I don't have access.

0 Karma
1 Solution

lguinn2
Legend

If you don't have access to the .conf files, then yes - the only way to do this is to add the field to all the sourcetypes.

To speed things up, you can go to Manager » Fields » Field extractions and do this: open the field extraction that you need to copy. Using the copy/paste function of your browser, copy the Extraction/Transform from the first field, then create New field extractions and paste in the Extraction/Transform string.

This should be faster than running the Interactive Field Extractor multiple times. However, it won't work unless the field really is the same across all sourcetypes...

View solution in original post

0 Karma

rahulrawlani
Explorer

Hello

I even had a similar situation; and it seems to achieve it, below is something that works for me.

Assume if I have 2 sourcetypes namely st1, st2 from which I want to fetch the exact same field, I need to do the below

props.conf
[(?::){0}st*]
REPORT-st_combined = st_combined

transforms.conf
[st_combined]
REGEX = MyRegex

lguinn2
Legend

If you don't have access to the .conf files, then yes - the only way to do this is to add the field to all the sourcetypes.

To speed things up, you can go to Manager » Fields » Field extractions and do this: open the field extraction that you need to copy. Using the copy/paste function of your browser, copy the Extraction/Transform from the first field, then create New field extractions and paste in the Extraction/Transform string.

This should be faster than running the Interactive Field Extractor multiple times. However, it won't work unless the field really is the same across all sourcetypes...

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...