Verschiebe monit-Überwachung in MariaDB-Rolle
This commit is contained in:
parent
b97ed4fdaf
commit
3ca97db324
1 changed files with 14 additions and 0 deletions
14
templates/monit.j2
Normal file
14
templates/monit.j2
Normal file
|
@ -0,0 +1,14 @@
|
|||
check process mysqld with pidfile /var/run/mysqld/mysqld.pid
|
||||
group database
|
||||
start program = "/usr/sbin/service mysql start"
|
||||
stop program = "/usr/sbin/service mysql stop"
|
||||
{% if inventory_hostname == "orwell" or inventory_hostname == "wwwusers-ng.sao" %}
|
||||
if failed host 127.0.0.1
|
||||
{% else %}
|
||||
if failed host {{ ansible_default_ipv4.address }}
|
||||
{% 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
|
||||
if failed unixsocket /var/run/mysqld/mysqld.sock protocol mysql for 3 times within 4 cycles then restart
|
||||
if 5 restarts with 5 cycles then timeout
|
Loading…
Reference in a new issue