How Splunk Cloud handles syslog data over UDP
Using Splunk Cloud, you cannot configure your deployment as a syslog server or a syslog message sender, but you can configure the Splunk Universal Forwarder to listen on a UDP network port and forward data to your Splunk Cloud deployment.
While it is possible to configure the Universal Forwarder to receive syslog events directly, refrain from doing so for the following reasons:
- Splunk best practice involves setting up a separate machine that runs a syslog service to handle syslog tasks
- The Universal Forwarder modifies syslog data by default as part of the indexing process (it assigns a timestamp and a host to the event.)
- Syslog data streams to only one Universal Forwarder instance in this scenario. In a deployment with multiple indexers, you must perform additional work to distribute the data across those indexers
- If the Universal Forwarder fails for any reason, any syslog messages that were sent during the downtime would be irrecoverably lost
Do not substitute the Universal Forwarder for a syslog server in regular use unless you have no other options.
If you must retain raw syslog data (for example, a data retention policy requires access to untouched events), consider using a tool such as
syslog-ng to simultaneously save the raw data to a log file and forward events to your Splunk deployment. This gives you the added advantage of indexing the log file later if you want.
See the diagrams later in this topic for a description of how the Universal Forwarder handles syslog events over UDP.
How the Universal Forwarder handles syslog inputs
When you configure a UDP network input to listen to a syslog in the Universal Forwarder, any syslog events that arrive through the input receive a timestamp and connected host field. The Universal Forwarder prepends these fields to each event before indexing.
You can change this behavior by setting the
no_appending_timestamp attribute in inputs.conf.
If the data contains a syslog header, the Universal Forwarder strips it out unless you set the
no_priority_stripping attribute in the stanza.
The Universal Forwarder does not modify TCP packets in this fashion. If you send syslog data over TCP, the Universal Forwarder does not strip priority information from the events. It does, however, prepend a host name and time stamp to the event unless you tell it not to.
How the Universal Forwarder handles syslog outputs
The Universal Forwarder can also forward events to another syslog server. When it does, it prepends the priority information to the event so that the downstream syslog server can translate the events properly.
When the event reaches the downstream syslog server, that host prepends a timestamp, priority, and connected host name, which is the Universal Forwarder instance.
You can also prepend a timestamp and host name to the event at the time you forward the event to the syslog server.
For information on configuring routing, filtering, and usage of source types, see Route and filter data in the Splunk Enterprise Forwarding Data manual and the props.conf spec file in the Splunk Enterprise Admin manual.
How the Universal Forwarder moves syslog events when you configure it to use syslog source type
The following diagram shows how Splunk Enterprise moves two syslog messages from one syslog server to another. In the diagram, Splunk Enterprise listens on a UDP network port and indexes incoming events. On the other side, the same instance forwards events to a second, third-party syslog server.
In the diagram, Message A originates as a syslog event and Message B originates as a similar event that does not have priority information associated with it. Upon receipt, Splunk Enterprise tags the events with a timestamp and the host that generated the event.
If you configured the instance as a forwarder, Splunk Enterprise then transforms the events by adding a priority header (that you specify in
outputs.conf) before it forwards the events on to the syslog server. Once they arrive at the syslog server, that server prepends timestamp and host data to the events as it received them from the Splunk Enterprise instance.
How Splunk Enterprise moves syslog events when you configure a custom source type
In this diagram, Splunk Enterprise has been configured to use a non-syslog source type.
The initial Messages A and B are identical to the first example. In this example, Splunk Enterprise prepends the event with an originating host name or IP address.
How Splunk Enterprise moves syslog events when you configure it with timestamping
You can also configure Splunk Enterprise to add timestamps to syslog events when you forward those events. You could time stamp the events when you don't want the downstream server to add its own timestamp. The following diagram shows the required attribute and depicts how Splunk Enterprise deals with the data.
The initial Messages A and B are identical to the first and second examples. Splunk Enterprise prepends the events with a timestamp and an originating host name or IP address.
Get data from TCP and UDP ports on a forwarder for Splunk Cloud
Send SNMP events to your Splunk deployment
This documentation applies to the following versions of Splunk Cloud™: 7.1.3, 7.1.6, 7.2.4, 7.2.6, 7.2.7, 7.2.8, 7.2.9, 8.0.2001