I maintain many virtualhosts (over 60) hosted on a Centos server running Apache. The virtualhosts gets created using Plesk, which creates separate log files for each domain using the following pattern
I would like to centralize all these logs on another server to parse them with elasticsearch + logstash. Currently I have a bash script which create a
<domain>.conf file in the
/etc/rsyslog.d/ for each domain contained in the
/var/www/vhosts dir, with the following configuration:
InputFileName /var/www/vhosts/<domain_name>/statistics/logs/access_log $InputFileTag apache-access: $InputFileStateFile state-apache-access $InputRunFileMonitor
Is there a way to create a single .conf file which will send all the logs to my central logging server? Something like
Any help is appreciated!