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
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

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

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 GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...