Monitoring Splunk

Monitor multi directory and using whitelisting

roccotocco
New Member

I have to monitorize multiple log such access_log, error_log and xferlog_regular files in a different categories. The structure more or less would look like (example with 2 log files):

/var/www/vhosts/site1/statistics/logs/access_log
/var/www/vhosts/site1/statistics/logs/error_log 
/var/www/vhosts/site2/statistics/logs/access_log
/var/www/vhosts/site2/statistics/logs/error_log
/var/www/vhosts/site3/statistics/logs/access_log
/var/www/vhosts/site3/statistics/logs/error_log
/var/www/vhosts/site4/statistics/logs/access_log
/var/www/vhosts/site5/statistics/logs/error_log

obviously site1 one can be for example mycustomerstiename.com and site2 can be google.com…, so every sitename its different. So, which regex i have to use to get all that logs ? Thanks

Tags (1)
0 Karma

gkanapathy
Splunk Employee
Splunk Employee
[monitor:///var/www/vhosts/*/statistics/logs/access_log]
sourcetype=access_common

[monitor:///var/www/vhosts/*/statistics/logs/error_log]
sourcetype=apache_error

would do it.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...