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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...