[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Check dependency
From: |
Piotr Gasidło |
Subject: |
Check dependency |
Date: |
Sun, 1 Jul 2012 14:20:26 +0200 |
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
- Check dependency,
Piotr Gasidło <=