You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example 3: Do not run the check in the backup window on Sunday between 0AM to 3AM, otherwise run the check with the regular poll cycle frequency.
check process mysqld with pidfile /var/run/mysqld.pid
not every "* 0-3 * * 0"
Describe alternatives you've considered
As a workaround I have been able to enter * 6-5 * * * where I wanted to enter not every "* 5-6 * * 0" because my goal is to run every minute, every hour, every day, except between hours of 5 and 6, every day, evere month, every day of the week.
Additional context
To reproduce go to create or edit a service in monit UI, enable advanced mode. In "poll time" enter not every * 5-6 * * * or 'not every' * 5-6 * * * or "not every" * 5-6 * * * and I tried a few other permutations and the form sometimes if I recall correctly, errors with validation input. Fair enough.
Sometimes for instance entering not every * 6-5 * * * ends with an entry in /usr/local/etc/monitrc of every "not every * 6-5 * * *" without form validation error but when you investigate you see an entry in the plugin log of:
I am contradicting the allowed entry above but I forgot a bit which ones. It matters not, as we can easily see that the form validation does not parse for "Should be a string between 1 and 255 characters. Allowed characters are letters and numbers as well as asterisk, hyphen, comma and space."
Edit: A validation error can be created entering not every "* 6-5 * * *" as an entry attempt.
In summary. I think the current validation unless I have been unable to find the correct way to enter it, does not allow a window to not run the check. Since the underlying code is able to accept it, I hope we can enable those entries.
The text was updated successfully, but these errors were encountered:
Addition. If we enter * 6-5 * * * to have an unmonitored window between 05:00 and 06:00 then the monit service starts but this "service setting" stays in status "Waiting" indefinitively.
I have been able to use the alternative workaround of * 6-24,0-5 * * *. Now it goes to "OK" instead of "Waiting".
It would still be very useful to be able to use negative as per monit's code and documentation.
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Is your feature request related to a problem? Please describe.
The monit plugin does not currently allow to use negative cron style schedules
Describe the solution you'd like
I would like to be able to enter a negative expression as per the monit official documentation https://mmonit.com/monit/documentation/monit.html#Service-checks
Describe alternatives you've considered
As a workaround I have been able to enter
* 6-5 * * *
where I wanted to enternot every "* 5-6 * * 0"
because my goal is to run every minute, every hour, every day, except between hours of 5 and 6, every day, evere month, every day of the week.Additional context
To reproduce go to create or edit a service in monit UI, enable advanced mode. In "poll time" enter
not every * 5-6 * * *
or'not every' * 5-6 * * *
or"not every" * 5-6 * * *
and I tried a few other permutations and the form sometimes if I recall correctly, errors with validation input. Fair enough.Sometimes for instance entering
not every * 6-5 * * *
ends with an entry in /usr/local/etc/monitrc ofevery "not every * 6-5 * * *"
without form validation error but when you investigate you see an entry in the plugin log of:I am contradicting the allowed entry above but I forgot a bit which ones. It matters not, as we can easily see that the form validation does not parse for "Should be a string between 1 and 255 characters. Allowed characters are letters and numbers as well as asterisk, hyphen, comma and space."
Edit: A validation error can be created entering
not every "* 6-5 * * *"
as an entry attempt.In summary. I think the current validation unless I have been unable to find the correct way to enter it, does not allow a window to not run the check. Since the underlying code is able to accept it, I hope we can enable those entries.
The text was updated successfully, but these errors were encountered: