Aw: Re: every cron cycles
"Robert Ehrenleitner" <[email protected]>
| Newsgroups | gmane.comp.monitoring.monit.general |
|---|---|
| Message-ID | <trinity-8d80033f-761e-40b4-9e6e-8e35c50218d4-1561447955811@3c-app-gmx-bs67> |
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" <[email protected]> An: "[email protected]" <[email protected]> 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 -- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general