Server Fault is a question and answer site for system and network administrators. 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 want to have Monit check a web application's health, running a cheap/trivial check frequently and an expensive/nontrivial check less frequently (e.g. 1/5 minutes). How can I tell it to check a given host less frequently than every monitoring interval?

share|improve this question
up vote 7 down vote accepted

I was looking at the Monit documentation and stumbled across this:

check process dynamo with pidfile /etc/ every 2 cycles
       start program = "/etc/init.d/dynamo start"
       stop program  = "/etc/init.d/dynamo stop"
       if failed port 8840 then alert

So you could specify any number of check cycles between checks for your expensive check. Configure Monit to have the check interval you desire.

share|improve this answer

Two options:

  1. Run a second instance of Monit with a different pid file, different check interval and a different config file.
  2. Wrap the expensive check in a script that will repeat the status of the last check until the next "expensive interval". Adjust the alert count to compensate.
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.