[GH-ISSUE #577] Allow custom replies as opposed to static OK #423

Closed
opened 2026-02-25 23:42:24 +03:00 by kerem · 3 comments
Owner

Originally created by @piramiday on GitHub (Oct 21, 2021).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/577

at present, the web URLs return a static OK.

curl -i https://hc-ping.com/[...]
HTTP/2 200 
server: nginx
date: [...]
content-type: text/plain; charset=utf-8
content-length: 2
access-control-allow-origin: *

OK

it might be useful for certain situations to be able to customize the success message returned by HealthChecks in order to specify something else, i.e. a static message which can be different for each check.

(dumb) example:
let's think of a check to make sure my RSS feeds are working.
since the Healthcheck URL does not return a valid RSS feed, my client will not let me store it as a custom feed.
if Healthcheck could pretend to return a valid RSS (empty) feed, then my client could accept it and I would have a robust way of knowing that my client is fetching feeds as necessary.

Originally created by @piramiday on GitHub (Oct 21, 2021). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/577 at present, the web URLs return a static `OK`. ``` curl -i https://hc-ping.com/[...] HTTP/2 200 server: nginx date: [...] content-type: text/plain; charset=utf-8 content-length: 2 access-control-allow-origin: * OK ``` it might be useful for certain situations to be able to customize the success message returned by HealthChecks in order to specify something else, i.e. a static message which can be different for each check. (dumb) example: let's think of a check to make sure my RSS feeds are working. since the Healthcheck URL does not return a valid RSS feed, my client will not let me store it as a custom feed. if Healthcheck could pretend to return a valid RSS (empty) feed, then my client could accept it and I would have a robust way of knowing that my client is fetching feeds as necessary.
kerem 2026-02-25 23:42:24 +03:00
  • closed this issue
  • added the
    feature
    label
Author
Owner

@cuu508 commented on GitHub (Oct 22, 2021):

Interesting idea, thanks for the suggestion!

I would prefer if there was no additional configuration on the server side. Instead, the client could specify the preferred format in URL somehow. For example, if the normal ping URL is

https://hc-ping.com/0ec6a754-2efe-47c3-865c-a31d7d6b1d55

A variation for RSS, and, say, 1x1 transparent GIF could be perhaps:

https://hc-ping.com/0ec6a754-2efe-47c3-865c-a31d7d6b1d55.rss
https://hc-ping.com/0ec6a754-2efe-47c3-865c-a31d7d6b1d55.gif
<!-- gh-comment-id:949319277 --> @cuu508 commented on GitHub (Oct 22, 2021): Interesting idea, thanks for the suggestion! I would prefer if there was no additional configuration on the server side. Instead, the client could specify the preferred format in URL somehow. For example, if the normal ping URL is https://hc-ping.com/0ec6a754-2efe-47c3-865c-a31d7d6b1d55 A variation for RSS, and, say, 1x1 transparent GIF could be perhaps: https://hc-ping.com/0ec6a754-2efe-47c3-865c-a31d7d6b1d55.rss https://hc-ping.com/0ec6a754-2efe-47c3-865c-a31d7d6b1d55.gif
Author
Owner

@piramiday commented on GitHub (Oct 22, 2021):

in this configuration, what would the server respond to the client GETting the https://hc-ping.com/XXX.rss URL?
something along the lines of:

<rss version="2.0">
   <channel>
      <title>Healthchecks</title>
      <lastBuildDate>[...]</lastBuildDate>
   </channel>
</rss>

and so on?

<!-- gh-comment-id:949697031 --> @piramiday commented on GitHub (Oct 22, 2021): in this configuration, what would the server respond to the client GETting the `https://hc-ping.com/XXX.rss` URL? something along the lines of: ``` <rss version="2.0"> <channel> <title>Healthchecks</title> <lastBuildDate>[...]</lastBuildDate> </channel> </rss> ``` and so on?
Author
Owner

@cuu508 commented on GitHub (Dec 19, 2022):

I'm not planning to work on this feature. I think there are niche use-cases where it would be useful, but they seem too niche to warrant the extra complexity (not so much code complexity, but the documentation and the API surface area).

Possible workarounds –

Self-hosted instances can perhaps configure the reverse proxy to rewrite responses and/or add response headers. For nginx, for example, there is http://nginx.org/en/docs/http/ngx_http_sub_module.html

For the hosted service, one could write a lambda function (or cloudflare worker or whatever) that wraps a ping endpoint and modifies its response. It's an extra hassle, but it's an option.

<!-- gh-comment-id:1357286440 --> @cuu508 commented on GitHub (Dec 19, 2022): I'm not planning to work on this feature. I think there are niche use-cases where it would be useful, but they seem too niche to warrant the extra complexity (not so much code complexity, but the documentation and the API surface area). Possible workarounds – Self-hosted instances can perhaps configure the reverse proxy to rewrite responses and/or add response headers. For nginx, for example, there is http://nginx.org/en/docs/http/ngx_http_sub_module.html For the hosted service, one could write a lambda function (or cloudflare worker or whatever) that wraps a ping endpoint and modifies its response. It's an extra hassle, but it's an option.
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#423
No description provided.