Getting Data In

Difference between 'show default-hostname' and 'show servername'


When running these two commands on a host I get different values. What (if any) is the difference between the two?

# /opt/splunk/bin/splunk show default-hostname
Default hostname for data inputs: sapi09.
# /opt/splunk/bin/splunk show servername
Server name:$USER
Tags (1)

  • servername is used to identify the Splunk instance for features such as distributed search and defaults to <hostname>-<user running splunk>. You set this in server.conf.
  • default-hostname is used as default "host" field on all events coming from that Splunk instance. You set this in inputs.conf.