Getting Data In

How would I change the index of a sourcetype?

ronniebotts87
New Member

For example using WinEventLog: Security
In props.conf

[WinEventLog:Security]
TRANSFORMS-routing=forexamplename

And in transforms.conf

[forexamplename]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = rabblerabbleforexample

Appreciate any help with this as well if I'm doing it wrong.

0 Karma

somesoni2
Revered Legend

Recommended method would be to update your inputs.conf, on the forwarder(s) where you're collecting it, to include new index name.

inputs.conf on forwarder

[WinEventLog://Security]
index= rabblerabbleforexample
...other attributes...

If for some reason, you can't do that, above props-transforms would work (setup on Indexer or heavy forwarder whichever comes first in your data flow. would require a restart of Splunk)

valiquet
Contributor

If your data is already ingested, you can use |collect

0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...