I have multiple LightForwarded, in different domains, who have similar host names (machines inside one domain are the same as machines in another domain),
how can i configure each splunk LightForwarder to add the domain name of any event it sends to the Central splunk ?
You can edit the hostname assigned to events from a host by editing the host= value in your
$SPLUNK_HOME/etc/system/local/inputs.conf. Just change it from
this will change the local events, but events from the syslog, for example, will not be changed by this, which is fine, as they might come from other machines in the same domain.
so, i want to add .something.com to all hostname evetns, is that possible somehow ?
I'm sorry, but i'm not sure what you're trying to get at here. Your question indicated you're using a forwarder setup rather than syslog. How are you sending your syslog to splunk? Via a direct network input in splunk or via syslog-ng and then indexing the resulting logs?
syslog has info from local and remove machines
the *nix app is fixed by host= entry
but, the same host writes things to syslog,and other nodes writes to syslog through syslogd, these entires dont have the domaine, for example,
Aug 12 14:20:06 xen00 last message repeated 3 times
this doesnt have the domain name, so the same machine, from different SplunkLightForwarders in different locations will be indexed under the same hostname.
i want splunk in each location to add a domain name to the hostname it sees in syslog.
Splunk has a transformer that extracts "host" from syslog sourcetypes, and that will override any given
host=myhostname that you setup in
inputs.conf. Just for the record, I do think setting your hostname in this way is also a good idea, but I suggest doing so at the top of
system/local/inputs.conf (as ftk suggests) rather than in the
unix app--this way the setting is fully global and not limited to a single app context.
I recommend using a transformer for adding a static domain name to your
host field. I've previously posted some config examples (linke below) that works for the syslog (and various derived) sourcetypes. The example shown is smart enough not to accidentally append your domain to an IP address.
Please see my answer here:
I'm not 100% sure, you can try it. Worst case scenario is that you have to put it on the indexer. I think this also depends on your Splunk version, I think 4.0 does more on light forwarder than was handled by the 3.x light forwarders.