Getting Data In

Forward messages to different indexes based on the value of its field

myordanov95
Engager

Is it possible to forward messages to different indexes based on the value of message field ?
And which forwarder is the most appropriate (Universal or Heavy) ?

Tags (1)
0 Karma

sudosplunk
Motivator

Yes. Using props.conf and transforms.conf, you can achieve this. Please provide some sample data to perform regex matching. Otherwise, below is the basic structure of configuration settings for routing events.

Props.conf:

[your_custom_sourcetype]
TRANSFORMS-routing = routing_based_on_field_values

Transforms.conf:

[routing_based_on_field_values]
REGEX = <your_custom_regex>
DEST_KEY = _MetaData:Index
FORMAT = <alternate_index_name>

You can find more information in below links, let me know if this helps.

http://docs.splunk.com/Documentation/Splunk/7.1.2/Indexer/Setupmultipleindexes#Route_specific_events...

https://answers.splunk.com/answers/566448/route-specific-events-to-a-relative-index.html

myordanov95
Engager

In case of having a thousands of different values , I want to create thousands of indexes. Does it mean I have to declared thousands of stanzas.

0 Karma

sudosplunk
Motivator

Oh, you want to route each event with different value to a different index? I thought, you want to look for specific value in the raw events and route all the events which have this specific value to different index(s).

0 Karma

myordanov95
Engager

Yes, I want to forward events with different value to a different indexes.

0 Karma

sudosplunk
Motivator

Can you provide some sample events with values which you want to route.

0 Karma

myordanov95
Engager

{"name":"value1"},
{"name":"value2"},
....
{"name":"value1000"}

In this case, I want to forward events to 1000 indexes.

0 Karma

sudosplunk
Motivator

Are all these events coming from 1 source/host? Also, why do you want to forward each event to each index.

0 Karma

myordanov95
Engager

Sorry, I am looking for solution of this problem.

0 Karma
Get Updates on the Splunk Community!

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 ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...