From 6db4c2d9001fa66e2ff8a644a4a028895111e56f Mon Sep 17 00:00:00 2001 From: phil Date: Mon, 8 May 2023 21:13:26 +0200 Subject: [PATCH] Test only socket connection --- templates/monit.conf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/monit.conf b/templates/monit.conf index fd8eca4..4e4c857 100644 --- a/templates/monit.conf +++ b/templates/monit.conf @@ -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 port 3306 protocol mysql + if failed unixsocket /run/mysqld/mysqld.sock 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 + for 3 times within 4 cycles then restart if 5 restarts with 5 cycles then timeout