monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Aw: Re: every cron cycles


From: Robert Ehrenleitner
Subject: Aw: Re: every cron cycles
Date: Tue, 25 Jun 2019 09:32:35 +0200

Hi, David,
 
Thanks for pointing out that this should work. I should have tried before asking:
 
    if status notequal 0 for 3 times within 5 cycles then alert
    every "* 6-18 * * *"
    every 3 cycles
 
Boom, it really works in monit 5.25.2. Older versions rejected this.
 
 
Gesendet: Montag, 24. Juni 2019 um 19:05 Uhr
Von: "David Jones" <address@hidden>
An: "address@hidden" <address@hidden>
Betreff: Re: every cron cycles
On 6/24/19 4:50 AM, Robert Ehrenleitner wrote:
> Hi,
> I am not sure if I missed a thing, but the document says, that the
> syntax of the "every" keyword is either:
> every NUM cycles
> or
> every CRON
> However, I want a service to be monitored between, say, 7 am and 6 pm
> every 5 cycles.
> Is there something like
> every "0 7-18 * * *" 5 cycles
> (according to the documentation, this is not syntactically correct).
> I already tried simply putting the "every" keyword multiple times:
> every "9 7-17 * * *"
> every 5 cycles
> which make monit reject the configuration file.
> If there is really no chance in configuring this, it would be nice to
> see it put on the roadmap for the next release.
>

I have this working today:

check program example with path "/bin/true" every 5 cycles
if status != 0 for 2 cycles then alert
not every "30-40 4 * * *"

I think you should be able to change the "not every" to your need and it
work fine.

--
David Jones
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

reply via email to

[Prev in Thread] Current Thread [Next in Thread]