Getting Data In

How to load data into multiple indexes based on the event data?

khreddy777
New Member

Can I dynamically assign index value at the indexer level to the events based on the data and load the data into the right index?
For example:
1,A,200
2,A,300
3,B,200
4,B,300
5,C,500
6,C,300

I have created three indexes indexA, indexB, indexC
I want to load the data into indexA,indexB,indexC based on the second column.

After data is loaded:
in IndexA I should have
1,A,200
2,A,300

in indexB I should have
3,B,200
4,B,300

in indexC I should have
5,C,500
6,C,300

0 Karma

neelshah
Path Finder

You may do this by using props.conf and transforms.conf.

-----------------props.conf---------------------

[index_A]
TRANSFORMS-filter_A_events= filter_A_events

[index_B]
TRANSFORMS-filter_B_events= filter_B_events

[index_C]

TRANSFORMS-filter_C_events= filter_C_events

----------Transforms.conf--------------------------

[filter_A_events]
REGEX =
DEST_KEY = queue
FORMAT = indexQueue

[filter_B_events]
REGEX =
DEST_KEY = queue
FORMAT = indexQueue

[filter_C_events]
REGEX =
DEST_KEY = queue
FORMAT = indexQueue


If you are using HF to forward events, place these .conf files on HF.
If you are using UF for forward events, place these .conf files on Indexer

Hope this helps ...!!!

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...