Splunk Enterprise

howto: let forwarders send events to multiple splunk infrastructures

florianzimm
Engager

hi,

scenario: elk-server has logfiles of test und prod systems. we have two separate splunk-infrastructures, test & prod.

goal: send events, based on 'source', to test-splunk-infra or prod-splunk-infra.

 

thanks for your input, florian.

Labels (1)
0 Karma
1 Solution

saravanan90
Contributor

Below may help.

file1.log will move to prod-splunk-infra, file2 will move to test-splunk-infra

 

In inputs.conf

[monitor:///var/log/file1.log]
_TCP_ROUTING = prod_env
disabled = false
index = main
sourcetype = anysourcetype

[monitor:///var/log/file2.log]
_TCP_ROUTING = dev_env
disabled = false
index = main
sourcetype = anysourcetype

 

In outputs.conf

[tcpout:prod_env]
server=prod1_idx1:9997, prod_idx2:9997


[tcpout:dev_env]
server=dev_idx1:9997, dev_idx2:9997

View solution in original post

saravanan90
Contributor

Below may help.

file1.log will move to prod-splunk-infra, file2 will move to test-splunk-infra

 

In inputs.conf

[monitor:///var/log/file1.log]
_TCP_ROUTING = prod_env
disabled = false
index = main
sourcetype = anysourcetype

[monitor:///var/log/file2.log]
_TCP_ROUTING = dev_env
disabled = false
index = main
sourcetype = anysourcetype

 

In outputs.conf

[tcpout:prod_env]
server=prod1_idx1:9997, prod_idx2:9997


[tcpout:dev_env]
server=dev_idx1:9997, dev_idx2:9997

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