Getting Data In

host value for windows


I've seen a few postings on this topic, but there doesn't seem to be final solution. I'm getting up to four different styles of host name from my windows boxes:

  1. COMPUTER NAME (all upper case, not fqdn)
  2. computer name (all lower case, not fqdn)
  3. (the value I actually want, canonical DNS fqdn)
  4. (derived from AD info if present)

This is annoying, and I'd like to know if there is one spot where I can set option 3 such that it will override all the others. So far I haven't found it. Furthermore it would great if splunk installation prompted for this, so you don't have to find and edit the files.

Tags (1)


Figured out how to do it with yet another ugly hack. You can get the host name part of the windows computer name, however it appears, with this:

eval x=split(host, ".") | eval w_host=mvindex(x,0)

This normalises your hostname if it does have the domain part, but still works if it doesn't.

You can then use this in a form to match your windows host however it appears:

sourcetype=wmi:cputime host=*$w_host$*

which normalises data sources which do not have the domain part, but still works if they do.

Nasty, should be unnecessary, but it works.

0 Karma


There is no single place that this can be set. If you want to set a consistent host format, the most direct way is to set it explicitly for each input. This can be a painful solution if you are using the deployment server and/or have many Windows forwarders.

You will also need to override TRANSFORMS = syslog-host Splunk automatically applies the syslog-host transformation to some of the sourcetypes that are syslog-based. To override it, you will need to add


to the appropriate sourcetype stanza of props.conf on all of the indexers. If you use "heavy" forwarders, you will also need to set it there as well.

You could submit this to Splunk Support as an enhancement request. (The more requests, the more likely that someone will add this as a feature in a future release...)


The silence has been deafening...

0 Karma

Splunk Employee
Splunk Employee

I am also finding this problem... Does anybody have any solution??

0 Karma
*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!


Or Learn More in Our Blog >>