Getting Data In

How to monitor 2 different file types in the same folder

splunkIT
Splunk Employee
Splunk Employee

If I need to monitor 2 different file types in the same folder and send them to different indexes, how do I do that?

Tags (2)

DerekB
Splunk Employee
Splunk Employee

I would setup 2 separate monitor stanzas that monitor the folder.
In each stanza I would create a whitelist for the specific file type, such as:

[monitor:///mnt/logs/*.log]
index=test1

[monitor:///mnt/logs/*.txt]
index=test2

This should direct the .log events to the test1 index and send .txt to test2.

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