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!

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