Getting Data In

Splunk Receiving Syslog Mesages via TCP or UDP

scornish
Engager

All, I'm going to configure Splunk to receive Syslog messages and have not yet decided which transport protocol I will be using.

I'm thinking of just sticking with UDP devices some of my devices may only be able to send messages using UDP.

Besides the normal preferences for TCP over UDP, why is it strongly recommended to configure Splunk to receive Syslog messages via TCP instead of UDP?

Stephanie

Tags (1)

krugger
Communicator

I would argue that the preference for TCP is because UDP syslog messages are truncated at around 1K bytes. So if you intend to have long messages coming in via syslog you should chose TCP.

gkanapathy
Splunk Employee
Splunk Employee

It is not strongly recommended from Splunk to favor TCP over UDP in general. This will be dictated by your own requirements. In cases where delivery of log messages needs to be guaranteed, you will have to use TCP. Similarly, if you need to encrypt the data connection, you should use TCP. However, if (for example) your application logs directly over TCP and the local queue fills up, then your application will block or have to wait to write its own log messages. In many cases, this will be be unacceptable as it will probably cause severe application performance degradation. In such cases, UDP will be preferred.

Simeon
Splunk Employee
Splunk Employee

The recommendation partially stems from the protocol itself. UDP does not provide guarantee of delivery which can cause data to go missing. Specific to Splunk, the tcp connection will log additional metrics (like source host) within Splunk. When considering connection problems or missing data, the TCP connection is much more desirable.

Lowell
Super Champion

You can setup both at the same time. You may also want to consider setting up syslog-ng in front of splunk due to splunk downtime and disk persistence issues. See the following splunk blog for some additional info:

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2026-2027 SplunkTrust is officially open. If ...