Run monit check only against localhost

This commit is contained in:
phil 2023-02-15 23:01:10 +01:00
parent 73bf0925bc
commit 6ebb563bf6
3 changed files with 2 additions and 5 deletions

View file

@ -2,8 +2,7 @@ check process mariadb with pidfile /run/mysqld/mysqld.pid
group database
start program = "/usr/sbin/service mysql start"
stop program = "/usr/sbin/service mysql stop"
if failed host {{ mariadb.monit_check_address | default(ansible_default_ipv4.address) }}
port 3306 protocol mysql
if failed host port 3306 protocol mysql
username "{{ monit_sql_user }}" password "{{ monit_sql_password }}"
with timeout 15 seconds for 3 times within 4 cycles then restart
if failed unixsocket /run/mysqld/mysqld.sock protocol mysql for 3 times within 4 cycles then restart