Re: Repeat alerts for CHECK PROGRAM
Sebastian Arcus <[email protected]>
| Newsgroups | gmane.comp.monitoring.monit.general |
|---|---|
| Message-ID | <[email protected]> |
On 04/12/18 01:29, Guillaume François wrote: > Hello > > On my side I have to do like this as other method never succeed > > check program mycheck with path "/var/lib/monit/scripts/mycheck.sh" not > every "* 0-16 * * *" > if status != 0 for 2 cycles then alert > alert [email protected] <mailto:[email protected]> with reminder on 15 cycles > alert [email protected] <mailto:[email protected]> with reminder on 20 > cycles > group mygroup > group sample Thank you for that - I will try it. It is a bit of a pain though, as all of a sudden you have the alert email address spread all over monitrc, instead of just one setting at the top which can quickly be amended when needed. It seems like a bug to me - I will see if I can flag it up with the developers. > > > Best Regards, > > > Le lun. 3 déc. 2018 à 22:04, Sebastian Arcus <[email protected] > <mailto:[email protected]>> a écrit : > > > On 03/12/18 20:55, Sebastian Arcus wrote: > > Hello all, > > > > I am struggling to configure Monit to repeat alerts for the CHECK > > PROGRAM stanza. I have in my global section: > > > > SET ALERT <my_email> WITH REMINDER ON 720 CYCLES > > > > then further down: > > > > CHECK PROGRAM sa-update WITH PATH "/bin/sh -c '/usr/bin/sa-update'" > > IF STATUS > 1 FOR 3 CYCLES THEN ALERT > > > > This only sends an alert once when the return status changes for > > 'sa-update' - but doesn't send further reminders. The > documentation and > > online examples seem to suggest that I should keep on getting > regular > > alerts while sa-update returns status higher then 1. But I don't. > The > > daily reminders work fine though for the other types of checks - > such as > > CHECK HOST. > > > > I have tried to add "WITH REMINDER ON ..." - but Monit doesn't > like that > > syntax - although there is one example using it in the online docs. > > Apologies - the above is incorrect. I meant to say I've tried the > following syntax from the docs: > > CHECK PROGRAM sa-update WITH PATH "/bin/sh -c '/usr/bin/sa-update'" > IF STATUS > 1 FOR 3 CYCLES THEN ALERT REPEAT EVERY 720 CYCLES > > and Monit doesn't accept it - it doesn't seem to like the word REPEAT: > > /etc/monitrc:164: syntax error 'REPEAT' > > -- > To unsubscribe: > https://lists.nongnu.org/mailman/listinfo/monit-general > > > > -- > -----BEGIN GEEK CODE BLOCK----- > Version: 3.1 > GCS/IT d(+) s++:- a C++$ ULC(+)>+++$ !P--- L+>$ !E---? W+++$ !N* !o-- > K--? w(+) !O---? !M- !V--? PS+? !PE Y+ PGP++>+++ !t-- !5 !X- R(+)>++* > tv-? b(-) DI !D- G(+)>+ e+++ h--() r->$ y?* > ------END GEEK CODE BLOCK------ > > -- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general