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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...