a-bali/janitor

Wrong time duration logged when error is resolved

Closed this issue · 0 comments

In case of Exec/Ping/HTTP checks, LastError attribute gets updated every cycle, therefore the message logged when the error is resolved contains wrong time duration. E.g.:

[2024-03-12 13:44:58] ⚠ Exec ERROR for cam2 timelapse recent, last seen 2m0s ago
[2024-03-12 13:45:58] ⚠ Exec ERROR for cam1 timelapse recent, last seen 2m0s ago
[2024-03-12 13:59:00] ✓ Exec OK for cam1 timelapse recent, in error since 1m0s ago
[2024-03-12 13:59:01] ✓ Exec OK for cam2 timelapse recent, in error since 1m0s ago