Hi, you can use the "depends on" option to create the dependency tree (at minimum Monit release 5.15.0 is needed to make Monit wait for the pre-requisite services).
See monit manual for more details: https://mmonit.com/monit/documentation/monit.html#SERVICE-DEPENDENCIES Best regards, Martin > On 2 Feb 2017, at 20:17, Oscar Segarra <[email protected]> wrote: > > Hi, > > In my environment I want to be sure the gluster volumes are started up and > published through NFS. > > glusterd service (must be up) <-- If down, monit has to restart it > | > glusterfsd service (must be up) <-- If down, monit has to restart it (but it > has to wait a while for glusterd to be started + 10 seconds) > | > nfs-ganesha service (must be up) <-- If down, monit has to restart it (but it > has to wait a while for glusterfsd to be started + 10 seconds) > | > showmount -e localhost | grep nfs-vdic-mgmt-vm (check if nfs-volume is being > exported) <-- If returncode!=0 it has to restart service nfs-ganesha + 20 > seconds > > showmount -e localhost | grep nfs-vdic-images (check if nfs-volume is being > exported) <-- If returncode!=0 it has to restart service nfs-ganesha + 40 > seconds > > In my environment, I have realized that monit is trying to restart > nfs-ganesha 3 times simultaneously. I'd like to introduce a kind of "wait" > and a dependency. > > Is it possible to achieve this with monit? > > Thanks a lot. > -- > To unsubscribe: > https://lists.nongnu.org/mailman/listinfo/monit-general
-- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
