monit-general
[Top][All Lists]
Advanced

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

Re: Check dependency


From: Martin Pala
Subject: Re: Check dependency
Date: Sun, 1 Jul 2012 18:09:06 +0200

You can set the pgbouncer to passive mode, also as the php-cgi depends on the 
nginx already, i think you can simplify the dependency (the dependency o nginx 
is implied via the php-cgi dependency):

check pgbouncer
    mode passive
    depends on php-cgi

The passive mode makes monit not to call start/stop/restart for this service.

Regards,
Martin


On Jul 1, 2012, at 2:20 PM, Piotr Gasidło wrote:

> I have three services nginx, php-cgi and pgbouncer.
> 
> Now I must setup dependency chain, but there is a problem.
> 
> Checking if php-cgi is running depends on nginx.
> Checking if pgbouncer is running depends on php-cgi and nginx.
> 
> If I setup dependencies like this:
> 
> check nginx ...
>  if ... then restart
> 
> check php-cgi ...
>  if ... then restart
>  depends on nginx
> 
> check pgbouncer
>  if ... then restart
>  depends on nginx, php-cgi
> 
> Now. When php-cgi fails monit restarts php-cgi and pgbouncer - for me
> this is wrong. State of pgbouncer is unknown (probably it is OK) until
> php-cgi gets restarted and check in pgbouncer (via nginx / php-cgi)
> will confirm if it should be also restarted or not.
> 
> I need something like check dependency (not to be confused with
> start/stop dependency) - if monit is unable to fullfill check
> dependencies for service it doesn't do anything to this service
> (restarts, etc.).
> 
> Is it possible with monit? Any patch?
> 
> -- 
> Piotr Gasidło
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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