|
From: | Mark Olliver |
Subject: | restart after cycles |
Date: | Wed, 5 Oct 2011 11:14:19 +0100 |
Hi, I am a little unsure on the retry / restart rules, I have checked the config below and it is valid my question is does it mean that it will restart after which of the following: 1, 2 failed connection attempts in 1 cycle 2, 2 failed connection attempts in either cycle 3, 4 failed connection attempts over 2 cycles Ideally I would want option 3. I then want it to alert me should it then still be failing on the 3 cycle as that probably means I need manual intervention. set mail-format { from: address@hidden subject: $SERVICE $HOST message: Monit $ACTION $SERVICE at $DATE on $HOST: $DESCRIPTION. } check process postgresql with pidfile /var/run/postgresql/8.4-main.pid start program = "/etc/init.d/postgresql-8.4 start" stop program = "/etc/init.d/postgresql-8.4 stop" if failed unixsocket /var/run/postgresql/.s.PGSQL.5432 protocol pgsql retry 2 2 cycles then restart if failed unixsocket /var/run/postgresql/.s.PGSQL.5432 protocol pgsql 3 cycles then alert if failed host localhost port 5432 protocol pgsql retry 2 2 cycles then restart if failed host localhost port 5432 protocol pgsql 3 cycles then alert alert address@hidden group database Thanks Mark |
[Prev in Thread] | Current Thread | [Next in Thread] |