diff --git a/README.md b/README.md index 550890a..04f0123 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,12 @@ Folgende Variablen können über die jeweilige `host_vars` im Dictionary `maria |--|--|--| | local_backupdir | string | Lokales Verzeichnis der sql-Backups | | bind_address | string | Listen-Adresse des Mariadb-Servers, wird bisher nicht konfiguriert | +| monit_check_address | string | Adresse für den Monit-Verbindungscheck | Beispiel: ```YAML mariadb: local_backupdir: /var/lib/backups/mariadb bind_address: "10.0.0.2" + monit_check_address: "127.0.0.1" ``` diff --git a/templates/monit.conf b/templates/monit.conf index 5b80144..2726bef 100644 --- a/templates/monit.conf +++ b/templates/monit.conf @@ -2,7 +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.bind_address|default( ansible_default_ipv4.address ) }} + if failed host {{ mariadb.monit_check_address | default(ansible_default_ipv4.address) }} port 3306 protocol mysql username "{{ monit_sql_user }}" password "{{ monit_sql_password }}" with timeout 15 seconds for 3 times within 4 cycles then restart