[GH-ISSUE #994] Get informed if job run time is too short #694

Closed
opened 2026-02-25 23:43:18 +03:00 by kerem · 2 comments
Owner

Originally created by @Yaya-Cout on GitHub (Apr 15, 2024).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/994

Recently, I realized that my MariaDB was not dumping to the backup due to a configuration error. (I renamed the config file without using the new name in the script). Healthcheck.io should have notified me, but, as my command is something like mysqldump | gpg, mysql error was not detected by my script (I fixed it now with set -o pipefail).

This case could be detected by Healthcheck.io by checking if the job is running too fast (because dumping is way faster without dumping 😄) and notifying in this case.
If we want to go further, we could set this time semi-automatically by comparing to the previous run and checking if there is too much variation (maybe in both side, too long and too fast, but it might be redundant with grace time), like +/- 20% of the previous run time (configurable). I don't know if it's a good idea because it would be "probabilistic" and can fail to detect failures. Another problem is to know if Healthcheck.io should send a down message (even if the next run would probably run successfully as the base time have changed) or just a warning.

Anyway, thanks for this great software, it is so useful, have many features and simple to use.

Originally created by @Yaya-Cout on GitHub (Apr 15, 2024). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/994 Recently, I realized that my MariaDB was not dumping to the backup due to a configuration error. (I renamed the config file without using the new name in the script). Healthcheck.io should have notified me, but, as my command is something like `mysqldump | gpg`, mysql error was not detected by my script (I fixed it now with `set -o pipefail`). This case could be detected by Healthcheck.io by checking if the job is running too fast (because dumping is way faster without dumping :smile:) and notifying in this case. If we want to go further, we could set this time semi-automatically by comparing to the previous run and checking if there is too much variation (maybe in both side, too long and too fast, but it might be redundant with grace time), like +/- 20% of the previous run time (configurable). I don't know if it's a good idea because it would be "probabilistic" and can fail to detect failures. Another problem is to know if Healthcheck.io should send a down message (even if the next run would probably run successfully as the base time have changed) or just a warning. Anyway, thanks for this great software, it is so useful, have many features and simple to use.
kerem closed this issue 2026-02-25 23:43:18 +03:00
Author
Owner

@cuu508 commented on GitHub (Apr 16, 2024):

Thanks for the suggestion, and for the explanation of the use case. There's a similar feature request – #236 – so I will close this one.

<!-- gh-comment-id:2058544746 --> @cuu508 commented on GitHub (Apr 16, 2024): Thanks for the suggestion, and for the explanation of the use case. There's a similar feature request – #236 – so I will close this one.
Author
Owner

@cuu508 commented on GitHub (Apr 16, 2024):

I added a note about using set -o pipefail in docs: github.com/healthchecks/healthchecks@0b28aa1cdf

<!-- gh-comment-id:2058669432 --> @cuu508 commented on GitHub (Apr 16, 2024): I added a note about using `set -o pipefail` in docs: https://github.com/healthchecks/healthchecks/commit/0b28aa1cdf7f997bbfe930e224917ecd6368ffeb
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#694
No description provided.