2023-02-07 19:51:39 +01:00
|
|
|
check process mariadb with pidfile /run/mysqld/mysqld.pid
|
2021-11-23 21:29:01 +01:00
|
|
|
group database
|
|
|
|
start program = "/usr/sbin/service mysql start"
|
|
|
|
stop program = "/usr/sbin/service mysql stop"
|
2022-07-23 13:02:08 +02:00
|
|
|
{% if inventory_hostname == "orwell" %}
|
2021-11-23 21:29:01 +01:00
|
|
|
if failed host 127.0.0.1
|
|
|
|
{% else %}
|
2022-07-23 13:02:08 +02:00
|
|
|
if failed host {{ mariadb.bind_address|default( ansible_default_ipv4.address ) }}
|
2021-11-23 21:29:01 +01:00
|
|
|
{% endif %}
|
|
|
|
port 3306 protocol mysql
|
|
|
|
username "{{ monit_sql_user }}" password "{{ monit_sql_password }}"
|
|
|
|
with timeout 15 seconds for 3 times within 4 cycles then restart
|
2023-02-07 19:51:39 +01:00
|
|
|
if failed unixsocket /run/mysqld/mysqld.sock protocol mysql for 3 times within 4 cycles then restart
|
2021-11-23 21:29:01 +01:00
|
|
|
if 5 restarts with 5 cycles then timeout
|