Splunk Dev

Receiver to certain index

FRoth
Contributor

I'd like to route received data (Receiver) to a certain index. I set an "index" in the "inputs.conf" but this didn't work.

[splunktcp://9997]
connection_host = ip
index = win_native

What I did: I configured a receiver on my splunk server and prepared an index on another partition that has enough space. (Index=win_native)

I would like to route all incoming data on that port (9997) to another index instead of the "main" index. The main index is located on a partition with only 5GB space.

I tried to accomplish this with the following changes but this didn't work neither.

In props.conf

[WinEventlog:Security]
TRANSFORMS-towinnativeindex = winnativeindex

In transforms.conf

[winnativeindex]
REGEX = .*
DEST_KEY = _MetaData:Index
FORMAT = win_native

Any ideas?

Tags (4)
0 Karma

FRoth
Contributor

Ahhhh - I missed a "typo" in the sourcetype. "WinEventlog" has to be "WinEventLog" with an uppercase "L". Now I use [source::WinEventLog...] as stanza and the transforms are applied.

0 Karma

kristian_kolb
Ultra Champion

It's better to set it up at source, so-to-speak, i.e. in inputs.conf on the forwarder;

[WinEventLog:Security]
disabled=0
index=win_native

Just ensure that the index exists on the receiving end, i.e. the indexer.

/K

rsennett_splunk
Splunk Employee
Splunk Employee

good point...

With Splunk... the answer is always "YES!". It just might require more regex than you're prepared for!
0 Karma

rsennett_splunk
Splunk Employee
Splunk Employee

When you say "it didn't work". Do you mean that cooked data came in on port 9997 and was indexed into the main index?

Is it possible that you have another inputs.conf with a similar declaration declaring index=main deliberately somewhere? You shouldn't really need the props and transforms in this case if you want everything coming on that port to go to the one index.

With Splunk... the answer is always "YES!". It just might require more regex than you're prepared for!
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...