All Apps and Add-ons

Splunk DB Connect: distribute events to different indexes

FritzWittwer_ol
Contributor

We have data in a database from which we get records with db connect. They contain, among others, a selection field. The events must be filled into different indexes based on the selector field:

Event=1 Selector=a  => index_a
Event=2 Selector=b => index_b
Event=3 Selector=a => index_a

There might be hundreds of different values in the selector field and thus also hundreds of indexes. Using a own saved search or a search with a case statement is not really an option.

The events belong to different user groups and have to be distributed into different indexes to enforce access control. Using 'Restrict Search Terms' is not an option. I was thinking about something like

...| collect index=index_<<SelectorFieldValue>>

This works obviously not 😉 has anyone a hint?

0 Karma

MuS
Legend

Hi FritzWittwer,

If this is only related to new events, you can use this approach here https://answers.splunk.com/answers/354923/how-do-i-route-events-into-different-indexes-based.html which will rewrite the _MetaData:Index field based on the event content.

Existing, already index events need to be transferred using some export method or the collect command but this was marked as not an option.

Hope this helps ...

cheers, MuS

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In November, the Splunk Threat Research Team had one release of new security content via the Enterprise ...

Index This | Divide 100 by half. What do you get?

November 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

❄️ Celebrate the season with our December lineup of Community Office Hours, Tech Talks, and Webinars! ...