Getting Data In

How to split event to two indexes?

klim
Path Finder

I would like to know if it is possible to be able to inject an event to a heavy forwarder via the hec and then have it be split into two events and sent to different indexes.

For example I have the original log line of:

ID=1 time=”2022-12-29 16:57:41 UTC” name=”person” address=”abc” message=”some note”.

I want the event to be split but the two new events can share similar fields.

So index1 would be:  

ID=1 time=”2022-12-29 16:57:41 UTC” name=”person” address=”abc”

And index2 would be:

ID=1 time=”2022-12-29 16:57:41 UTC” message=”some note”

Labels (3)
Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

I believe it can be done.  Use the CLONE_SOURCETYPE setting in transforms.conf to create a copy of the event and give it a new sourcetype.   Then each sourcetype should be able to use REGEX and FORMAT settings to select the fields they want.

You'd think that the new Ingest Actions feature would be perfect for this, but it does not offer the type of changes you want to make.

This would be easier using Cribl (http://cribl.io).

Either way, duplicating the events means doubling your ingest, with corresponding effects on your license and storage.

---
If this reply helps you, Karma would be appreciated.
0 Karma

klim
Path Finder

thanks. doubling my ingest doesn't sound like a great idea. It would be cheaper to send two requests.

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!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...