Getting Data In

How to assign the appropriate host name for udp input type for universal forwarder?


I have a universal forwarder listening on udp:12000 for messages from various processes and relaying it to splunk indexer. Universal forwarder are receiving messages from some local processes (running on the same machine) and some from remote processes. For remote process the host name in the messages are correct i.e. the IP for those machines but for local process it's I understand the reason as the local processes are configured with If I change the configuration (for the local processes) with the IP of the machine, then I see the IP in the messages. Is there anyway I can configure universal forwarder to replace the localhost/ with the machine IP and still retain the host name for the remote processes as it is?


or you could filter at the inputs.conf in your UF but you cannot have a generic udp/tcp stanza and filtered ones,you will have to set it (and maintain it) for each device.


host= <host ip or name>

host= <host ip or name>



host= <host ip or name>

host= <host ip or name>


0 Karma


The problem is that Universal Forwarder doesnot do/have the following:

NO Bundles Python

NO Per-event filtering

NO Event routing

NO Event parsing

Then you will have to override the host metadata with matching regex at Indexer Level:


DEST_KEY = MetaData:Host 
REGEX = (localhost\/127\.0\.0\.1)
FORMAT = host::<your host ip or name>


TRANSFORMS-localhostrename = host_override


I have exactly the same problem, does anyone know of a way around this? It appears from the docs that you can only manually override the host for inputs that are monitoring files or directories, but I need some way of setting the host to the local machine name for UDP/TCP inputs. (Localhost/ are not very useful!)

0 Karma
Don’t Miss Global Splunk
User Groups Week!

Free LIVE events worldwide 2/8-2/12
Connect, learn, and collect rad prizes and swag!