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.

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Raffi
  • 63
  • 1
  • 3

1 Answers1

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.

Jodie C
  • 1,869
  • 12
  • 13
  • 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 02:15
  • 2
    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