Getting Data In

Sourcetype Override

kenchisho
Path Finder

Hi guys... I have a couple of script inputs that generate network status data... the issue is that a single script inputs data for multiple sourcetypes... The data itself has a filed sourcetype=$value$

is there a simple way to override the default sourcetype "exec" like for host override:

[sourcetype-override]
REGEX = (?i)sourcetype=(\w+)
FORMAT = sourcetype::$1
DEST_KEY = MetaData:SourceType

Tags (3)

piebob
Splunk Employee
Splunk Employee

if your events can be identified via regex, you can do this:

http://docs.splunk.com/Documentation/Splunk/latest/Data/Advancedsourcetypeoverrides

you'll need to do this on the indexer--this won't work on the forwarder, unless it's a 'heavy forwarder'.

0 Karma

kenchisho
Path Finder

thnx. i'we seen the guide but this will not work in this case... the examples in the guide match a regex and then based on that match set the source type manually...

[some_stanza]
REGEX = some_regex
FORMAT = sourcetype::my_log (manually set source type to my_log)
DEST_KEY = MetaData:Sourcetype

This would require a stanza in props.conf for every source type i wish to have for a single scripted input source...

what i am trying is to extract the source type itself using a regex and route those events to that source type...

Get Updates on the Splunk Community!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...