Getting Data In

TCP input override

hethu
Path Finder

Hi,

I am using a TCP input in splunk to receive WSUS data, gathered and pushed to splunk by a powershell script. 

My question is if it is possible to use the same input, and override source type based on a field value in the received data? I have field called "datasource" in my data.

Labels (1)
0 Karma

The_Simko
Path Finder

Yes, it is possible. Note, it may cause excessive CPU usage on the indexer / heavy forwarder.  
  
props.conf and transforms.conf (most likely on indexer, but if you have the data coming to a heavy forwarder, then put the props and transforms there as well)

In the transforms example below, adjust the regex to grab the field you are looking for. 

For More details, see: https://docs.splunk.com/Documentation/Splunk/8.0.4/Data/Advancedsourcetypeoverrides 

props.conf
[<sourcetype>]
TRANSFORMS-changedatasource = datasource_finder

transforms.conf
[datasource_finder]
SOURCE_KEY = _raw
REGEX = datasource=(\w+)
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::$1

Get Updates on the Splunk Community!

Application management with Targeted Application Install for Victoria Experience

  Experience a new era of flexibility in managing your Splunk Cloud Platform apps! With Targeted Application ...

Index This | What goes up and never comes down?

January 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Splunkers, Pack Your Bags: Why Cisco Live EMEA is Your Next Big Destination

The Power of Two: Splunk &#43; Cisco at "Ludicrous Scale"   You know Splunk. You know Cisco. But have you seen ...