Skip to content
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

Healthcheck script last 5min time calculation does not take TZ into account #170

Closed
kbuc opened this issue Jul 11, 2023 · 2 comments
Closed

Comments

@kbuc
Copy link

kbuc commented Jul 11, 2023

At least on my system, the logs in fr24 container are in UTC time and the healthcheck script always gives:

($TIMESTAMP_NOW - $LOG_LAST_ENTRY_TIMESTAMP) around 7200 (my TZ is UTC+2), so it's always
No data sent data to fr24feed in past 5 mins. UNHEALTHY, even though the feeder is working fine.

I'm not sure how other systems are configured, but probably some -u should be used when interpreting the date taken from log? Now it is assuming the parsed date is in the local TZ, but it's not, at least in my case.

@markrmccracken
Copy link

I haven't checked the logs inside the container, but I"m having the same issue with that check always being found unhealthy and causing the container to restart at every check.

image

@kx1t
Copy link
Member

kx1t commented Feb 14, 2024

The container timezone is always in UTC, and when measuring time, we use relative time (seconds since epoch). Having said this, the HealthCheck routine underwent a bunch of changes in the last few days, and this should have solved the issue.

If you still see this, please let me know and/or feel free to reopen this issue. Thanks!

@kx1t kx1t closed this as completed Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants