Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to get the hang of the mon daemon, in linux. I was wondering, can you set up dependencies in mod, if so how. As far as I understand it the script below will run ping then http regardless. How to I make it so it only runs http if ping passes.

hostgroup test test.shahmirj.com

watch test
   service ping
        interval 5m
        monitor ping.monitor
        period wd {Mon-Fri}
            alert mail.alert email@example.com
            alertevery 5m
   service http
        interval 5m
        monitor http.monitor
        period wd {Sun-Sat}
            alert mail.alert email@example.com
            upalert mail.alert -S "web server is back up" mis
            alertevery 45m

If the above runs ping only then http, How to you get it to run the different ones regardless.

Thanks in advance

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.