Files
VPS-scripts_Monit/conf/monit/fail2ban.conf

11 lines
669 B
Plaintext

check process fail2ban with pidfile /var/run/fail2ban/fail2ban.pid
start program = "/bin/systemctl start fail2ban"
stop program = "/bin/systemctl stop fail2ban"
if failed unixsocket /var/run/fail2ban/fail2ban.sock then restart
if failed unixsocket /var/run/fail2ban/fail2ban.sock for 3 cycles then exec "/opt/MonitNotify.sh 'SRV-WARN: Fail2Ban Socket'"
else if recovered then exec "/opt/MonitNotify.sh 'SRV-OK: Fail2Ban Socket'"
if not exist for 1 cycles then restart
if not exist for 3 cycles then exec "/opt/MonitNotify.sh 'Fail2Ban service'"
else if recovered then exec "/opt/MonitNotify.sh 'SRV-OK: Fail2Ban service'"