Skip to content

Fix age of monitors which last updated more than a day ago - #1978

Merged
jamesoff merged 1 commit into
jamesoff:developfrom
bardrop-oss:fix-html-old-age
Nov 23, 2026
Merged

jamesoff merged 1 commit into
jamesoff:developfrom
bardrop-oss:fix-html-old-age

Conversation

@bardrop

@bardrop bardrop commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

The HTML logger works out the age of a monitor's last update as age.days * 3600 + age.seconds, so each full day counts as one hour.

A monitor with a gap longer than an hour can show as OK when it should be OLD. With gap = 43200 (12 hours) and a last update 25 hours ago, the age becomes 7200 seconds. After 3 days it is 10800 seconds, still "OK".

This uses total_seconds(). The new test checks 11, 13, 25 and 72 hours with a 12 hour gap; the last two fail without the change.

@jamesoff

Copy link
Copy Markdown
Owner

Thanks!

@jamesoff

Copy link
Copy Markdown
Owner

Failing tests are just the external SSL testing :)

@jamesoff
jamesoff merged commit 385b757 into jamesoff:develop Nov 23, 2026
10 of 22 checks passed
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

Successfully merging this pull request may close these issues.

2 participants