mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 23:15:49 +03:00
[GH-ISSUE #278] The "UTC / Local Time" switcher is confusing #210
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#210
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Cheezzhead on GitHub (Aug 21, 2019).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/278
I'm not sure if this is legitimately a bug or if I'm misunderstanding the cron scheduling feature, but either way it's not behaving like I expected and I don't really know why.
I have a job running at 5AM every morning (0 5 * * *). The job sends pings to my Healthchecks docker to measure execution time. Everything goes as expected until 3 hours later, when at 8 AM Healthchecks decides the job is down and sends an e-mail alert. The Healthchecks schedule is configured to the same cron schedule (0 5 * * *) with a grace period of 1 hour. I can't for the life of me understand why it suddenly thinks there's a failure at 8 AM.
To summarize:
Healthchecks schedule:
Cron Expression: 0 5 * * *Time Zone: UTCGrace Time: 1 HourHealthchecks Log:
Aug 21 | 08:00 | Sent email alert to admin@xxx.xx#25 | Aug 21 | 05:09 | OK | 9 min 57 sec HTTPS GET from xxx.xxx.xxx.xxx- curl/7.58.0#24 | Aug 21 | 05:00 | Started | HTTPS GET from xxx.xxx.xxx.xxx - curl/7.58.0Aug 20 | 08:00 | Sent email alert to admin@xxx.xx#23 | Aug 20 | 05:09 | OK | 9 min 9 sec HTTPS GET from xxx.xxx.xxx.xxx - curl/7.58.0#22 | Aug 20 | 05:00 | Started | HTTPS GET from xxx.xxx.xxx.xxx - curl/7.58.0(repeating, of course...)I've made sure to check if there are no issues with timezones, but none as far as I can see. Both the Healthchecks container and the guest OS report the same UTC timezone, and the log times also match up with the log entries of the job itself.
@cuu508 commented on GitHub (Aug 21, 2019):
One quick thing to check – in the check details page, at the top right of the log there is a [UTC | Local Time] switcher. Do the received ping timestamps look correct when it's switched to UTC?
@Cheezzhead commented on GitHub (Aug 21, 2019):
When I switch to local time, everything shifts back 2 hours. So the pings come in at ~3 AM, then at 6AM the alerts are sent. That makes sense I guess, as 6AM is when the grace period ends.
...It seems I confused UTC with CEST and mistakenly assumed that the UTC Time Zone was the correct local time. Whooops
@cuu508 commented on GitHub (Aug 21, 2019):
The [UTC | Local Time] switcher seems to be a relatively regular source of confusion:
I'll reopen this and will try changing how the switcher works. Let's say my configured timezone for the check is "Europe/Riga". Instead of showing these options:
I will change it to:
If check's configured timezone is UTC, then the switcher can be hidden altogether.
@cuu508 commented on GitHub (Aug 21, 2019):
Here's my current idea:
@Cheezzhead any thoughts? Do you think this would have helped you diagnose the issue?
@Cheezzhead commented on GitHub (Aug 22, 2019):
That would be a big improvement, yeah. Probably would've helped me solve this issue specifically as I would've seen the difference between the server's timezone and UTC sooner.
Although I should reiterate that the problem was mostly on my side, because in my haste I mixed up UTC and CEST :>