Hello, this is my requirement: I want to run a monitor exactly once
per day, around 4am. If the monitor fails, I want to get exactly one
alert; if it succeeds, nothing should happen.

This is what I've tried so far:

watch myserver
        service testservice
                description Test for monitoring once per day
                interval 5m
                exclude_period hr {5-23} min {0-59}, hr {0-3} min
{0-59}, hr {4} min {5-59}
                monitor testservice.monitor
                period wd {Mon-Sun}
                        alert mail.alert ale...@example.com

Currently, "testservice.monitor" is a dummy script that always returns failure.

I figured that leaving a 5-minute window for the monitor to run, it
would run exactly once during that 5-minute window. However, it
doesn't seem to work that way as I get no email.

I also though of using "interval 1d", but there doesn't seem to be a
way to specify when, during the day, the monitor should run, so I
suppose that would just take the time the daemon is started as the
start of the period, which isn't what I want since I may restart or
stop/start the daemon at different times for different reasons.

Ideas? Thanks.

_______________________________________________
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to