This won't do time based: https://mmonit.com/monit/documentation/monit.html#Setting-an-error-reminder
I don't know if anybody has other idea/way, but you can cron a schedule to > monit unmonitor check_table > sleep 5 > monit monitor check_table on your once per day time. But it will also report sucess. https://mmonit.com/monit/documentation/monit.html#Setting-an-event-filter On 10/15/2015 09:31 PM, Vikram Kone wrote: > Scheduling works. What about alerting once per day even if earlier alert > is active ? > > -V > > > > > On Thu, Oct 15, 2015 at 2:15 PM -0700, "Rui Lapa" <[email protected] > <mailto:[email protected]>> wrote: > > > man 5 crontab > > "0 19-23 * * *" > > On October 15, 2015 9:00:58 PM WEST, Vikram Kone > <[email protected]> wrote: > > Hi > I have a check program script that I want to run using > monit every hour starting at 12pm PST/ 19 UTC. > The script is pretty basic. It gets the current time , and then > execute a SQL query against a mysql db using the current date to > check if a table has data in it (select count (*) from table > where date = $today). If count = 0 it exits with code 0 else > with exit code 1. > > I have the following config > > > check program check_table > with path /opt/monit/scripts/check_table.sh > every "* 19 * * *" > if status != 0 then alert > > What this is currently doing is, starting at 12 PM, it executes > the script every 2 mins (my default polling interval ) till 1pm. > If it fails at the first check it raises an alert, and for the > subsequent checks it doesn't raise an alert. I'm guessing there > is some throttling in place that prevents monit from alerting > for the same issue more than once. But the problem is when next > day comes and at 12pm it starts the check again and it fails, I > don't get a new alert because there is already an active alert > for this. > > How can I solve this problem being able to get at most one alert > every day for this check > > -- > To unsubscribe: > https://lists.nongnu.org/mailman/listinfo/monit-general > > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > -- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
