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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...