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!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...