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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...