monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Postgresql Check


From: Martin Pala
Subject: Re: Postgresql Check
Date: Wed, 25 May 2011 21:06:31 +0200

Yes, you can add the number of cycles using "for <x> cycles" option or "<y> times within <x> cycles" ... for example to require 2 consecutive failures to report error:

--8<--
if failed host localhost port 5432 protocol pgsql for 2 times then restart
--8<--

Regards,
Martin


On May 25, 2011, at 7:10 PM, Kenneth Holcomb wrote:

I check the postgresql process (code below) and issue a restart when it fails.  However, in a couple of situations, postgresql is already starting but we kick off a second copy.  Is there a way to have it fail twice before issuing the restart? For other reasons, I don't want to change the polling time.

Thanks…….kenh

check process postgresql with pidfile /var/run/postmaster.5432.pid
   group database
   start program = "/etc/init.d/postgresql start"
   stop program = "/etc/init.d/postgresql stop"
   noalert address@hidden
   alert address@hidden
   alert address@hidden
   alert address@hidden
   if failed host localhost port 5432 protocol pgsql then restart
   if 5 restarts within 5 cycles then timeout

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


reply via email to

[Prev in Thread] Current Thread [Next in Thread]