I am using CETNOS 7,yum install fail2ban,in /etc/fail2ban/jail.local,I want to set:
[DEFAULT]
apache_error_log = /var/log/httpd/*error_log
/home/websites/.*?/log/errorlog
to express:
[DEFAULT]
apache_error_log = /var/log/httpd/*error_log
/home/websites/site1/log/errorlog
/home/websites/site2/log/errorlog
Then,I can use %(apache_error_log)s in /etc/fail2ban/jail.local as below:
[apache-noscript]
port = http,https
logpath = %(apache_error_log)s
Is this OK?
tailafter/home/websites/*/log/errorlog? – kittygirl Oct 12 '18 at 15:16logpathonly takes paths to log files to search. Fail2Ban handles reading the files internally, not through a pipe. – Esa Jokinen Oct 12 '18 at 17:19tail,fail2ban can only read10lines log.Will that causefindtimeinvalid? – kittygirl Oct 13 '18 at 02:27tailif the log files are huge, making the Fail2Ban startup slow. – Esa Jokinen Oct 13 '18 at 02:30