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 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...