Hi,
thank you for your answer.
I've checked the syntax about repeat feature, and it works (I have 5.20.0).
Unfortunately what I need is not the script execution: that's is ok.
What I need is repeat of alert notification, and as far as I know this
notification is sent when the state changes only: OK->Failure and
Failure->OK.
As workaround I could explore some configuration at server side or
forging some explicit signal by the script that is run every x cycles
(see dummy.sh in my example), but I don't know how to do it.
Thansk again
Pensare Web srl, via Macanno | 38/N
47923 Rimini RN (Italy)
T. 0541 309547 | F. 0541 1646143
Il 26/01/2017 16:56, Guillaume François ha scritto:
Hi,
Syntax is ok https://mmonit.com/monit/documentation/monit.html#ACTION
Could it be an issue related to the version of Monit you're using ?
Changelog (https://mmonit.com/monit/changes/) shows the behavior was
changed in 5.16.0 as before it was forced to "repeat every 1 cycle".
Therefore this syntax was not supported before.
Best Regards.
2017-01-26 16:27 GMT+01:00 Riccardo Leonardi <[email protected]
<mailto:[email protected]>>:
Hi,
I have a script checking mail queue returning alert if queue
lenght is greather than some threshold.
The alert is correctly forwarded to slack channel, but when the
threshold is reached only, not when the queue remains over the
threshold.
In fact the behaviour I'd like to implement is:
- receive the alert when the queue goes over the threshold
- continue receiving the alert (possibly with current queue
lenght) every x cycles
- stop receiving when the queue returns under the threshold
Currently I have implemented the following:
check program qlen_check with path
"/usr/local/monit/conf/check_qlen.sh 200"
if status != 0 then exec "/usr/local/monit/conf/dummy.sh"
repeat every 10 cycles
The script check_qlen.sh echoes queue lenght and return 1 if queue
> 200.
As soon as that happens I got 1 slack alert only, while I'd like
to keep receiving it every x cycles (when dummy.sh is correctly run).
Does anyone have any suggestion how to achieve that behaviour?
Thank you in advance.
Rik
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
<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
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general