New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Systemd OnCalendar timers #919
Comments
Thanks for the suggestion. I've been thinking about this for a long time as well! The main barrier is the absence of a python library for parsing and evaluating OnCalendar schedules. Forking out to No promises yet, but I've started work on a python library for this: https://github.com/cuu508/oncalendar/ |
The initial implementation is ready, and deployed to https://healthchecks.io. All testing welcome :-) Here's how the "Update Schedule" dialog looks: |
Awesome, thanks. I've deployed 3.1-dev to our server and adjusted our scripts, seems to work well so far with a few dozen checks and various timer formats. |
A little issue I ran in to involves grace time and We use fairly large random delays (up to 3600s) in our Jobs, since we have many that trigger at the same time and use the same resources. This means that using schedules instead of timeouts in Healthckecks, we constantly have Jobs that are in their grace period, waiting for the random delay of the systemd.timer to pass. We trigger the I wonder weather it would make some sense to add a 'green grace time', but that raises even more questions for me: Schedule offset: The expected time between the scheduled and the effective start time of the job. (RandomizeDelaySec and AccuracySec in Systemd) I imagine handling these delays separately would be fairly complicated and it isn't a priority, since it's only really relevant for Systemd and gracetime can just be set accordingly. |
I've thought about making icons gradually shift from green to orange as they progress through the grace window. But I'm not sure if this would be an improvement, you would still see non-pure-green statuses, and it may in the end look even more busy with many different shades of green/orange. Grace time was originally (A) the time to delay alerts when a success ping does not arrive on time. When I added support for the Grace time can also be used to account for random startup delay, and for the client system's clock being slightly off. |
How about adding a configurable percentage threshold for the icon changing to yellow? Question regarding grace time: If I have a Job scheduled for 00:00, a grace time of 1h and pings at 00:30 and 01:29, what would the behavior be? |
But it would add a configuration setting, that would need to be tucked in the UI somewhere, and explained in the docs. My suggestion would be to think of the orange status icons not as an error condition, but as a sign a particular check will run soon. Same as with traffic lights where orange means "the light will change soon".
Assuming the check is initially up,
|
Ok thanks |
The ability to time checks using cron syntax is great. However, we use systemd OnCalendar timers for all our timed jobs. It would be great, if healthchecks could parse those as well.
See this post for an explanation of the OnCalendar syntax.
The parser for this in systemd seems to be here. (in C)
There is also the systemd-analize tool, which has the ability to parse calendar settings.
The text was updated successfully, but these errors were encountered: