diff --git a/templates/monit.conf b/templates/monit.conf index 8ce13e7..fd8eca4 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 port 3306 protocol mysql + if failed 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