In inputs.conf the default host name is set to the fqdn, test-server.foobar.com. But when I search for that host, it comes up as two hosts: test-server and test-server.foobar.com.
splunkd.log shows the correct hostname, test-server.foobar.com.
This started happening after an upgrade from 3.x to 4.x on light weight forwarders, although some LWFs are working correctly.
It seems to only happen for the cron log and not the other inputs, what could be causing this and what can I do to fix it?
Some sourcetypes modify the hostname according to the contents of the file. This happens in particular for syslog sourcetypes. To stop it happening, use another sourcetype, or override the syslog host transform in props.conf
with either:
[syslog]
TRANSFORMS =
for most syslog sourcetypes, or
[postfix_syslog]
TRANSFORMS-host =
for the postfix_syslog
sourcetype. I don't know why that one had to be different.
Some sourcetypes modify the hostname according to the contents of the file. This happens in particular for syslog sourcetypes. To stop it happening, use another sourcetype, or override the syslog host transform in props.conf
with either:
[syslog]
TRANSFORMS =
for most syslog sourcetypes, or
[postfix_syslog]
TRANSFORMS-host =
for the postfix_syslog
sourcetype. I don't know why that one had to be different.
Thank you for the answer and comments....this info was very helpful!
(Or that not all the forwarders were Light Forwarders at the time of upgrade, and they become Light (again) when upgraded to 4.x and gained a default-mode.conf file.)
setting host=
as a global setting will use that unless host is set otherwise in a another input stanza, but this is a different issue and is caused by default TRANSFORMS
that will ignore/overrride whatever you set host=
to in inputs.conf
. I have a suspicion that not all the Forwarders are Light Forwarders.
Gerald, can you confirm--setting host=foo as a global parameter in inputs.conf does not make it a global setting. It is simply the default setting when nothing else sets the host field? So it looks like this behavior changed between 3.x and 4.x?