Getting Data In

Extracting sourcetype from source /tmp/csv/file1

hylam
Contributor

The sourcetype should be csv or tsv or psv, depending on the full path in the source field. For hosts we have host_regex and host_segment. Do we have sourcetype_regex or sourcetype_segment? Thx.

/tmp/csv/file1
/tmp/csv/file2
/tmp/tsv/file3
/tmp/tsv/file4
/tmp/psv/file5
/tmp/psv/file6

Tags (1)
0 Karma
1 Solution

esix_splunk
Splunk Employee
Splunk Employee

We dont have this ability now in Splunk. However, you can further filter the sourcetype by source via transforms and searching a regex against the meta data. This article has a good example -

https://answers.splunk.com/answers/112471/changing-sourcetype-with-regex.html

View solution in original post

esix_splunk
Splunk Employee
Splunk Employee

We dont have this ability now in Splunk. However, you can further filter the sourcetype by source via transforms and searching a regex against the meta data. This article has a good example -

https://answers.splunk.com/answers/112471/changing-sourcetype-with-regex.html

Get Updates on the Splunk Community!

AI for AppInspect

We’re excited to announce two new updates to AppInspect designed to save you time and make the app approval ...

App Platform's 2025 Year in Review: A Year of Innovation, Growth, and Community

As we step into 2026, it’s the perfect moment to reflect on what an extraordinary year 2025 was for the Splunk ...

Operationalizing Entity Risk Score with Enterprise Security 8.3+

Overview Enterprise Security 8.3 introduces a powerful new feature called “Entity Risk Scoring” (ERS) for ...