|
From: | Guido Accardo |
Subject: | Re: Processes dependencies |
Date: | Tue, 17 Mar 2015 09:20:13 -0300 |
Hi Guido,the dependencies in Monit are currently "soft" ... Monit performs the actions based on the dependency tree, but doesn't wait/verify that the "parent" service is functional before starting "children" services.
We plan to fix the dependencies to work exactly the same as you described.
Regards,MartinOn 13 Mar 2015, at 19:44, Guido Accardo <address@hidden> wrote:--HI all,I'm reading about service dependencies but I couldn't find any regarding monit waiting for a give process to start before starts another one. I have a Python based service that depends on redis-server to work, so here is the configuration:
check process redis-server with pidfile /var/run/redis/redis-server.pid
start program "/etc/init.d/redis-server start" with timeout 60 seconds
stop program "/etc/init.d/redis-server stop"
check process insert with pidfile /tmp/service.pid
start program "/root/init.sh start"
stop program "/root/init.sh stop"
depends on redis-serverWhen I start the insert process, monit starts it and also starts redis-server as expected but both at the same time. Given that my redis-server has to load a huge dataset, it takes about 40 seconds to initiate so insert start complaining about can't connecting to redis.Is there a way that I can tell monit to make sure redis-server is in running state before execute the start of insert?Can you tell me I there is another documentation but this http://mmonit.com/monit/documentation/monit.html#SERVICE-DEPENDENCIES regarding this topic?Thank you in advance.
-----Guido Accardo
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
[Prev in Thread] | Current Thread | [Next in Thread] |