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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...