Getting Data In

Is it possible for a universal forwarded to route on multiple ports?

erick_thompson
Explorer

I have a number of application deployments, and I want each deployment to send logs to a different instance of splunk. Due to the network configuration (the apps are on Azure), I need to use a forwarder. I was looking at the help for the outputs.conf file, and didn't see anything obvious. Is it possible to set up a universal forwarder to listen on multiple ports, and send each port to a different target server?

Thanks!
Erick

Tags (1)
1 Solution

dwaddle
SplunkTrust
SplunkTrust

Sure, but you need to configure both inputs.conf and outputs.conf. Something similar to this.

inputs.conf

[monitor:///var/log/httpd]
sourcetype=access_combined
_TCP_ROUTING=indexer1

[tcp://:12345]
_TCP_ROUTING=indexer2

[tcp://:45678]
_TCP_ROUTING=indexer3

outputs.conf

[tcpout:indexer1]
server=indexer1.Splunk.com:9997

[tcpout:indexer2]
server=indexer2.Splunk.com:9997

[tcpout:indexer3]
server=indexer3.Splunk.com:9997

View solution in original post

dwaddle
SplunkTrust
SplunkTrust

Sure, but you need to configure both inputs.conf and outputs.conf. Something similar to this.

inputs.conf

[monitor:///var/log/httpd]
sourcetype=access_combined
_TCP_ROUTING=indexer1

[tcp://:12345]
_TCP_ROUTING=indexer2

[tcp://:45678]
_TCP_ROUTING=indexer3

outputs.conf

[tcpout:indexer1]
server=indexer1.Splunk.com:9997

[tcpout:indexer2]
server=indexer2.Splunk.com:9997

[tcpout:indexer3]
server=indexer3.Splunk.com:9997

erick_thompson
Explorer

This is exactly what I am looking for. Thanks! I will try this out first thing on Monday.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...