Getting Data In

Sourcetype based on file name

Jboyle2
Engager

I already have sourcetypes defined for my data I am just confused as to set the source type based on the file name. Splunk monitors one folder that holds all different type of logs and i want it to automatically set the sourcetype based on the file name. For example one of the files has "nokia" (without quotes)in it. It isnt always in the same spot of the file name but it does show up at some point in every file name. How do i configure props and transforms to look for the word "nokia" and set its sourcetype to netx_nokia. Thanks in advance guys.

Tags (1)
1 Solution
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...