6

I'm configuring monit on Ubuntu 11.04. In monitrc, the following setting controls the interval at which the monit daemon monitors services...

set daemon 120

Is this a global setting? If I want to check different services, such as permissions on a directory and an http service, how can I configure monit to check directory permissions every week while pinging the http service every 5 minutes?

I understand it's possible to use the -d interval option when executing monit, but according to the documentation, this checks services only once, then exits, without repeating; not helpful for my needs since I need it to continuously execute.

6

You can set the per-test interval in cycles.

See this similar ServerFault.com question for some more information.

ie: if your interval is 300 seconds you could run an http check every cycle while running the weekly check every 2016 cycles.

  • I get it...one interval is one cycle, so for each test I may specify a different cycle from 1 to n, whatever the requirement to run that test based on multiples of the interval time, makes sense, thanks! – Raffi Mar 26 '12 at 2:15
  • 1
    Unfortunately there's an upper limit to number of cycles you can set in config file -- sizeof(long long) * 8) – sendmoreinfo Aug 18 '13 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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