Getting Data In

Modify sourcetype host extraction

FRoth
Contributor

I noticed that I receive logs from a single linux system with two different host names.

Some inputs are files in the /var/log/apache2 directory.

These are delivered as coming from lvps87-230-26-17.dedicated.hosteurope.de

The sourcetype of this input is access_common.

Another input is /var/log/auth.log

These log lines are delivered as coming from lvps87-230-26-17

The sourcetype is syslog

I understand that the sourcetype syslog does not take the FQDN, but I would like to change that and dont know where to find that configuration.

The linux host delivers by the Universal Forwarder to my Splunk index server. It is not a TCP or UDP Input.

Is there anyone with a solution to this issue?

---- 1 hour later ----

I noticed that splunk does not take the host name of the Universal Forwarder hostname as the database field "host" if the sourcetype is syslog.

It actually extracts the hostname from the log line which is quite useful in the case that several hosts are logging into a single syslog-file. (in my case auth.log)

What I did to avoid the duplicate host name entries was:

I changed the syslog-ng options of my system from options use_fqdn(no) to use_fqdn(yes)

Nevertheless - I would like to know how the sourcetype syslog can be configured to take the FQDN of the delivering Universal Forwarder and not to extract the hostname from the log line.
Thanks for your help.

1 Solution

gkanapathy
Splunk Employee
Splunk Employee

Add the config to props.conf on the indexer. (See here, noting that Universal and Light Forwarders work the same way.) This will affect all data with sourcetype syslog:

[syslog]
# yes, the next line sets it to an empty value
TRANSFORMS =

This overrides the default in $SPLUNK_HOME/etc/system/default/props.conf, of TRANSFORMS = syslog-host.

There are a few other versions of syslog in the defaults (e.g. cisco_syslog, windows_snare_syslog) that will have their own config that you would have to override separately if you desire.

View solution in original post

gkanapathy
Splunk Employee
Splunk Employee

Add the config to props.conf on the indexer. (See here, noting that Universal and Light Forwarders work the same way.) This will affect all data with sourcetype syslog:

[syslog]
# yes, the next line sets it to an empty value
TRANSFORMS =

This overrides the default in $SPLUNK_HOME/etc/system/default/props.conf, of TRANSFORMS = syslog-host.

There are a few other versions of syslog in the defaults (e.g. cisco_syslog, windows_snare_syslog) that will have their own config that you would have to override separately if you desire.

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!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...