Getting Data In

How to write a monitor stanza for configuring inputs.conf on forwarder for sub directories?

iamlearner123
Explorer

Hello,

I have a directory with sub directories and then logs. Can i please know how to write monitor stanza for this type of log monitoring ?

For instance,

/app/web/apacheweb -> main directoy

/app/web/apacheweb/apacheweb01/apache1.log -> sub directory with log
/app/web/apacheweb/apacheweb02/apache.2log -> sub directory with log
/app/web/apacheweb/apacheweb03/apache3.log -> sub directory with log

But all the sub directories have a same log format . so, i believe i can assign same sourcetype.

0 Karma

somesoni2
Revered Legend

You can use this

[monitor:///app/web/apacheweb/apacheweb*/apache*.log]
index = yourIndexHere
sourcetype=yourSourceTypeHere
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...