Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

 
discard

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

Browse other questions tagged or ask your own question.