Deployment Architecture

How to differ input files in universal forwarder

mkrauss1
Explorer

I'm using the universal forwarder, assume i have following log files:

bar-20170728.log
and

bar-20170728-foo.log

How would i setup inputs.conf to differ between the above logs.
Thats because i want to give them a different index and sourcetype.

Thx

Tags (1)
0 Karma

sbbadri
Motivator

[monitor:///path/bar-*.log]
disabled=false
index=a
sourcetype=a
whitelist=bar\-\d+\.log$

[monitor:///path/bar-*.log]
disabled=false
index=b
sourcetype=b
whitelist=bar\-\d+\-foo\.log$

0 Karma

mkrauss1
Explorer

Thank you

0 Karma
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 ...