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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...