[GH-ISSUE #959] Checks API field for last successful ping #671

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

Originally created by @Kemichal on GitHub (Feb 10, 2024).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/959

The /checks API already contains a field last_ping, this value will be the date for the last ping, including start or fail pings (AFAIK).

What I would like to know, via the API, is when the last successful ping happened.
Adding a new field like last_successful_ping would be very helpful.

Originally created by @Kemichal on GitHub (Feb 10, 2024). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/959 The /checks API already contains a field `last_ping`, this value will be the date for the last ping, including start or fail pings (AFAIK). What I would like to know, via the API, is when the last successful ping happened. Adding a new field like `last_successful_ping` would be very helpful.
kerem closed this issue 2026-02-25 23:43:13 +03:00
Author
Owner

@cuu508 commented on GitHub (Feb 12, 2024):

We don't currently track the last successful ping in the database, so making this work would not be as simple as exposing an additional database field.

Out of curiosity, what is your use case, how would you use the last successful ping timestamp?

<!-- gh-comment-id:1938821956 --> @cuu508 commented on GitHub (Feb 12, 2024): We don't currently track the last successful ping in the database, so making this work would not be as simple as exposing an additional database field. Out of curiosity, what is your use case, how would you use the last successful ping timestamp?
Author
Owner

@Kemichal commented on GitHub (Feb 14, 2024):

We don't currently track the last successful ping in the database, so making this work would not be as simple as exposing an additional database field.

I see

Out of curiosity, what is your use case, how would you use the last successful ping timestamp?

One of my use cases is to monitor background jobs (backups etc) on a lot of servers.
When these jobs start I send a start ping and then a success/fail ping when the job is done/crashed.

The thing is that some of these systems I'm monitoring are in environments where it's not unsual that the internet or power goes out for a few days.

So if some of my jobs goes down for a day or so I'm not going to start investigating the problem most of the time, but after a few days I'm more keen to look into it.

Therefor I have made an internal status page (using the API) that sorts the jobs in order of last successful ping (I thought) with extra visuals to signal a system that has been off for longer than 2 days.

<!-- gh-comment-id:1944468208 --> @Kemichal commented on GitHub (Feb 14, 2024): > We don't currently track the last successful ping in the database, so making this work would not be as simple as exposing an additional database field. I see > Out of curiosity, what is your use case, how would you use the last successful ping timestamp? One of my use cases is to monitor background jobs (backups etc) on a lot of servers. When these jobs start I send a start ping and then a success/fail ping when the job is done/crashed. The thing is that some of these systems I'm monitoring are in environments where it's not unsual that the internet or power goes out for a few days. So if some of my jobs goes down for a day or so I'm not going to start investigating the problem most of the time, but after a few days I'm more keen to look into it. Therefor I have made an internal status page (using the API) that sorts the jobs in order of last successful ping (I thought) with extra visuals to signal a system that has been off for longer than 2 days.
Author
Owner

@cuu508 commented on GitHub (Feb 15, 2024):

With what's available today, you could look at using the List check's status changes API. For checks that are currently down, you can use this API endpoint to determine when they went down (and so, for how long they have been down).

The downside of this approach is the additional HTTP requests to fetch this information.

<!-- gh-comment-id:1945673709 --> @cuu508 commented on GitHub (Feb 15, 2024): With what's available today, you could look at using the [List check's status changes](https://healthchecks.io/docs/api/#list-flips) API. For checks that are currently down, you can use this API endpoint to determine when they went down (and so, for how long they have been down). The downside of this approach is the additional HTTP requests to fetch this information.
Author
Owner

@Kemichal commented on GitHub (Feb 15, 2024):

@cuu508 Thanks for the suggestion, I think I could get it to work with flips. The extra requests are no big deal for my use case.

This issue can be closed unless you want to track it.

<!-- gh-comment-id:1946042276 --> @Kemichal commented on GitHub (Feb 15, 2024): @cuu508 Thanks for the suggestion, I think I could get it to work with flips. The extra requests are no big deal for my use case. This issue can be closed unless you want to track it.
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#671
No description provided.