Splunk Search

copy sourcetype and regex from one index to other index

felipesewaybric
Contributor

how i can copy sourcetype and regex from one index to other index?

Tags (2)
0 Karma

somesoni2
Revered Legend

Regex (field extraction) as coupled with sourcetype itself, so you don't need anything to be done there. Sourcetype and index are not directly related and their relationship is defined via inputs. While configuring inputs, you specify data from the input should go to which index and follow properties of which sourcetype. So if you want data for one sourcetype to be stored in indexB instead on indexA, you need to change your input to index data in indexB-sourcetype instead of (current) indexA-sourcetype.

alacercogitatus
SplunkTrust
SplunkTrust

You don't. sourcetype is set at the Inputs level. Regex is set for Search time. It doesn't matter which index the data is residing in, as long as the sourcetypes are the same.

You will want to review this: http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Prerequisitesforknowledgemanagement

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...