Getting Data In

Hostname swap

fzyqkl
New Member

Before I got my server named properly for splunk I received a lot of records under the hostname 'localhost:localdomain'. I am no longer receiving data from this hostname since I got the hostname changed. Is there any way to change the hostname in the records from 'localhost:localdomain' to 'myserver' so I can get rid of 'localhost:localdomain' from the Hosts list and retain the data??

Tags (1)
0 Karma

jbsplunk
Splunk Employee
Splunk Employee

You can't alter the metadata once it has been written, so any data associated with the metadata for host localhost:localdomain is going to be associated with that permanently within the index where the data exists. You could do search time field extractions to look for the host field matching that criteria and change it into 'myserver' when a match is found. A good example of this was used in another Answers post:

http://splunk-base.splunk.com/answers/27123/host-name-extraction-from-syslog-repository

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...