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'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.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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
    
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
add comment

Your Answer

 
discard

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.