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!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...