Splunk Dev

How to fix incorrect Instance name after change hostname?

krzysztofz
New Member

I have problem with change instance name in Splunk.

In conf files serverName variable is change to new hostname and splunk is restarted.

Everything is ok, but in, for ex. "Resource Usage: Instance" in "Instance" drop down list i see old hostname.

I try to find this in all Splunk files (db too) and find it only in \var\lib\splunk\kvstore\mongo\local.0 file.

What can i do to fix this problem?

Tags (1)
0 Karma

willsy
Communicator

There will be four places in linux that this could be. These are;

/etc/hostname
/SPLUNK_HOME/etc/system/local/server.conf
/SPLUNK_HOME/etc/system/local/inputs.conf
/SPLUNK_HOME/etc/system/local/deploymentclient.conf

server.conf 
[general]
serverName = whatever

inputs.conf
host = whatever

deploymentclient.conf
[deployment-client]
clientName = whatever

0 Karma

krzysztofz
New Member

I already edit this files.

But, i fix this problem in other way...

In Settings > General Setup i edit Instance (Actions > Edit > Edit Server Roles) and for ex. KV Store for a while.

After this in Resource Usage etc. i see correct Instance name and stats display correctly now (before fix not).

0 Karma

yannK
Splunk Employee
Splunk Employee

if you change the hostname, you may want to edit the splunk configurations to update it.

in $SPLUNK_HOME/etc/system/local/inputs.conf
the default stanza used for all inputs
check for host=something setting that may be the old hostname

in $SPLUNK_HOME/etc/system/local/server.conf
there is a hostname setting, used for the server name (for deployment client, or metrics)

adonio
Ultra Champion

try in etc/system/local/inputs.conf
change the host = oldName to newName
hope it helps

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...