<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can I change the default hostname in Splunk? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-change-the-default-hostname-in-Splunk/m-p/117400#M24433</link>
    <description>&lt;P&gt;Hi Guys,&lt;/P&gt;

&lt;P&gt;I have done both the below mentioned changes but abc01-2 is only appearing in "instance name" field of Deployment Server but no changes happened for the "host name".&lt;/P&gt;

&lt;P&gt;Updates made in etc/system/local files of both the instances of the forwarder.&lt;BR /&gt;
1.  Splunk1 &lt;BR /&gt;
Inputs.conf&lt;BR /&gt;
host = abc01&lt;/P&gt;

&lt;P&gt;server.conf&lt;BR /&gt;
[general]&lt;BR /&gt;
serverName = abc01&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt; Splunk2 
Inputs.conf
host = abc01-2&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;server.conf&lt;BR /&gt;
[general]&lt;BR /&gt;
serverName = abc01-2&lt;/P&gt;

&lt;P&gt;Kindly advise.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jun 2019 19:28:51 GMT</pubDate>
    <dc:creator>kamal_jagga</dc:creator>
    <dc:date>2019-06-14T19:28:51Z</dc:date>
    <item>
      <title>How can I change the default hostname in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-change-the-default-hostname-in-Splunk/m-p/117398#M24431</link>
      <description>&lt;P&gt;I don't like the default hostname that shows up in Splunk. I would like to change it to the FQDN. How can I do this quickly after my first install of Splunk? &lt;/P&gt;</description>
      <pubDate>Tue, 09 Sep 2014 16:31:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-change-the-default-hostname-in-Splunk/m-p/117398#M24431</guid>
      <dc:creator>DerekB</dc:creator>
      <dc:date>2014-09-09T16:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the default hostname in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-change-the-default-hostname-in-Splunk/m-p/117399#M24432</link>
      <description>&lt;P&gt;The servername in server.conf and the host in inputs.conf are automatically populated the first time splunk starts based on the results of the system command "hostname". So usually it returns the short hostname (from /etc/hosts, on linux, or the %SERVERNAME% in windows)&lt;/P&gt;

&lt;P&gt;see the specifications :&lt;/P&gt;

&lt;P&gt;in server.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;server.conf
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.3/Admin/Serverconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.3/Admin/Serverconf&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;CODE&gt;[general]&lt;BR /&gt;
serverName = &amp;lt;ASCII string&amp;gt;&lt;BR /&gt;
 * The name used to identify this Splunk instance for features such as distributed search.&lt;BR /&gt;
 * Defaults to &amp;lt;hostname&amp;gt;-&amp;lt;user running splunk&amp;gt;.&lt;BR /&gt;
 * May not be an empty string&lt;BR /&gt;
 * May contain environment variables&lt;BR /&gt;
 * After any environment variables have been expanded, the server name (if not an IPv6&lt;BR /&gt;
address) can only contain letters, numbers, underscores, dots, and dashes; and&lt;BR /&gt;
it must start with a letter, number, or an underscore.&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;
 * in inputs.conf&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.3/Admin/Inputsconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.3/Admin/Inputsconf&lt;/A&gt;&lt;BR /&gt;
and &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.3/Data/SetadefaulthostforaSplunkserver"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.3/Data/SetadefaulthostforaSplunkserver&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
[default] &lt;BR /&gt;
host = &amp;lt;string&amp;gt;&lt;BR /&gt;
* Sets the host key/field to a static value for this stanza.&lt;BR /&gt;
* Primarily used to control the host field, which will be used for events coming in&lt;BR /&gt;
via this input stanza.&lt;BR /&gt;
* Detail: Sets the host key's initial value. The key is used during parsing/indexing,&lt;BR /&gt;
in particular to set the host field. It is also the host field used at search time.&lt;BR /&gt;
* As a convenience, the chosen string is prepended with 'host::'.&lt;BR /&gt;
* WARNING: Do not quote the &amp;lt;string&amp;gt; value: host=foo, not host="foo".&lt;BR /&gt;
* If set to '$decideOnStartup', will be interpreted as hostname of executing machine;&lt;BR /&gt;
such interpretation will occur on each splunkd startup. This is the default.&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So depending of your server, it will be the short hostname or the fully qualified hostname.&lt;BR /&gt;
You can have your /etc/hosts being the full name.&lt;BR /&gt;
Or the classic workaround is to update with the name of your choice, just after installing.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt; edit the files&lt;/LI&gt;
&lt;LI&gt;or use the CLI&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.3/Admin/Changedefaultvalues"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.3/Admin/Changedefaultvalues&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;./splunk set servername foo.domain.com&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;./splunk set default-hostname foo.domain.com&lt;/CODE&gt;&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;PS : if you are thinking of the name used for the deployment-server matching, you can also rewrite it in deploymentclient.conf as clientname.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Sep 2014 16:36:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-change-the-default-hostname-in-Splunk/m-p/117399#M24432</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-09-09T16:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I change the default hostname in Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-change-the-default-hostname-in-Splunk/m-p/117400#M24433</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;

&lt;P&gt;I have done both the below mentioned changes but abc01-2 is only appearing in "instance name" field of Deployment Server but no changes happened for the "host name".&lt;/P&gt;

&lt;P&gt;Updates made in etc/system/local files of both the instances of the forwarder.&lt;BR /&gt;
1.  Splunk1 &lt;BR /&gt;
Inputs.conf&lt;BR /&gt;
host = abc01&lt;/P&gt;

&lt;P&gt;server.conf&lt;BR /&gt;
[general]&lt;BR /&gt;
serverName = abc01&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt; Splunk2 
Inputs.conf
host = abc01-2&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;server.conf&lt;BR /&gt;
[general]&lt;BR /&gt;
serverName = abc01-2&lt;/P&gt;

&lt;P&gt;Kindly advise.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 19:28:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-change-the-default-hostname-in-Splunk/m-p/117400#M24433</guid>
      <dc:creator>kamal_jagga</dc:creator>
      <dc:date>2019-06-14T19:28:51Z</dc:date>
    </item>
  </channel>
</rss>

