|Subject:||RE: monit alerts with exec|
|Date:||Thu, 26 Mar 2015 14:09:54 +0000|
It seems like the exec calls my script and it triggers every minute. This seems to be outside of the reminder so where is this interval set?
Can you show me an example of how I can control this in a script? My script captures some performance data from a script when the threshold is reached but I only want it executed -emailed to me once.
the native alert action sends the alert on state change only (the reminder option may send alert again if the problem persists).
The exec action is executed each time the test failed, as monit delegates full responsibility for the event processing to the script and cannot assume the script is to be executed on state change only. You can modify your script to handle state change only (monit provides set of environment variables to the script: http://mmonit.com/monit/documentation/monit.html#ENVIRONMENT) or you can use M/Monit (www.mmonit.com) as Monit extension, which has better alert rules support (including custom alert scripts execution on state change).
|[Prev in Thread]||Current Thread||[Next in Thread]|