Getting Data In

Can I configure universal forwarder to listen to a TCP port?

neltonk
Path Finder

I have a network appliance publishing log to a remote server which has universal forwarder installed... Is it possible to configure the universal forwarder to listen to the port (TCP) and forward it to indexer?

Please help...

Thanks,
Splunk Newbie

e343976
Engager

Yes, you can do this easily.

inputs.conf:
[tcp://:$PORT]
index=indexname
source=sourcename
sourcetype=sourcetypename

outputs.conf
[tcpout]
server = $IP

richgalloway
SplunkTrust
SplunkTrust

Universal forwarders don't listen to ports for events. You should use another program (like rsyslog or syslog-ng) to listen for log data and write it to a file. The universal forwarder can monitor that file and send events to Splunk as they are written.

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

adobrzeniecki
Path Finder

@richgalloway  I cannot find any documentation on caveats or issues with TCP inputs on UFs. I am in a bit of a quandry, my customer is in Cloud, does not have a HF on prem. They have an IDM in cloud, but the cloud team told us we cannot configure TCP inputs on an IDM. We do have a UF on prem. Could we setup the TCP inputs on the UF without any issues moving forward? This is for Zscaler.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

TCP inputs are not allowed in Splunk Cloud at all so you must have an on-prem instance to do it.

Another respondent says UFs can listen for TCP input.  Try it.  If it doesn't work, use a HF.  If your customer can run a UF they probably can run a HF.

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

alemarzu
Motivator

In addition to what @richgalloway said, you could also use a Heavy Forwarder instead of UF as they can be configured to listen and forward events to the Indexer/s.

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...