Any data that is configured (by you) to have the sourcetype syslog will pass through a transformation process, where the hostname is extracted from each event, on a per event basis. Typically this is something you would want to do, if you were collecting events from an existing syslog server. Instead of having the syslog server's hostname/ip-address as originator of these events, this process will extract and rewrite the hostname from each event. This is founded on the assumption that the hostname can be found in the expected place in the message.
Typically, syslog messages start with a timestamp, and that is followed by a hostname/ip-address. As you might expect, just by declaring a stream of events to be of type syslog will not make this transformation work, unless the hostname information is actually there. Also, the sourcetype name syslog has nothing to do with actual transport protocol.
It just means, "I want to call these events 'syslog', and for all messages of this type, please treat them as if they were standard syslog messages, and extract the hostname from where it should be."
You might want to read up on sourcetypes in general in the docs;
http://docs.splunk.com/Documentation/Splunk/latest/Data/Whysourcetypesmatter
One solution to deal with your current problem is to make a search-time extraction of the relevant part of the events (i.e. the part that contains the actual hostname). This can be done inline in a search query with the rex command, or through more permanent extractions in props.conf.
Please post a few sample events, and you'll probably get quick help with sorting out the regular expressions (if needed).
Hope this helps,
/K
... View more