[GH-ISSUE #543] Signaling successes and failures with the request body #392

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

Originally created by @remyroy on GitHub (Jul 14, 2021).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/543

It would be nice if we could signal successes or failures with the body that is being sent to the ping URL. It would be even better if we could easily configure the expected body to signal a success and the expected body to signal a failure.

One of the use case I'm thinking about is using a webhook receiver with Prometheus's Alertmanager. The webhook sends a JSON body with a POST to a URL. It would be nice if we could use the status field in that JSON body to signal a success (resolved) or a failure (firing).

Originally created by @remyroy on GitHub (Jul 14, 2021). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/543 It would be nice if we could signal successes or failures with the body that is being sent to the ping URL. It would be even better if we could easily configure the expected body to signal a success and the expected body to signal a failure. One of the use case I'm thinking about is using a webhook receiver with Prometheus's Alertmanager. The webhook sends [a JSON body with a POST to a URL](https://www.prometheus.io/docs/alerting/latest/configuration/#webhook_config). It would be nice if we could use the `status` field in that JSON body to signal a success (resolved) or a failure (firing).
kerem closed this issue 2026-02-25 23:42:17 +03:00
Author
Owner

@cuu508 commented on GitHub (Jul 29, 2021):

It would be nice if we could use the status field in that JSON body to signal a success (resolved) or a failure (firing).

I have no experience with Alertmanager, so not sure I understand the use case.

Would Alertmanager be firing the "resolved" events regularly, on a fixed schedule?

Or would it normally be quiet, and fire "failure" when there is a problem, and "success" when the problem is resolved?

If it is the latter, I think it would make more sense to point Alertmanager to an incident management system (PagerDuty, OpsGenie,etc.), not a dead-mans-switch service.

<!-- gh-comment-id:888925754 --> @cuu508 commented on GitHub (Jul 29, 2021): > It would be nice if we could use the status field in that JSON body to signal a success (resolved) or a failure (firing). I have no experience with Alertmanager, so not sure I understand the use case. Would Alertmanager be firing the "resolved" events regularly, on a fixed schedule? Or would it normally be quiet, and fire "failure" when there is a problem, and "success" when the problem is resolved? If it is the latter, I think it would make more sense to point Alertmanager to an incident management system (PagerDuty, OpsGenie,etc.), not a dead-mans-switch service.
Author
Owner

@remyroy commented on GitHub (Jul 29, 2021):

Alertmanager is normally quiet, fire a failure when there is a problem and it sends a success when resolved. Thanks for your input.

<!-- gh-comment-id:889072269 --> @remyroy commented on GitHub (Jul 29, 2021): Alertmanager is normally quiet, fire a failure when there is a problem and it sends a success when resolved. Thanks for your input.
Author
Owner

@cuu508 commented on GitHub (Aug 12, 2021):

In that case, I think having Alertmanager ping a check in Healthchecks would not work too well – there would be no regular intervals between webhooks calls.

PS. Instead of using webhooks, you could configure Alertmanager to use email: https://www.prometheus.io/docs/alerting/latest/configuration/#email_config. Healthchecks does support filtering by keywords in email message's subject line. See the "Filtering Rules" section here: https://healthchecks.io/docs/configuring_checks/

<!-- gh-comment-id:897456528 --> @cuu508 commented on GitHub (Aug 12, 2021): In that case, I think having Alertmanager ping a check in Healthchecks would not work too well – there would be no regular intervals between webhooks calls. PS. Instead of using webhooks, you could configure Alertmanager to use email: https://www.prometheus.io/docs/alerting/latest/configuration/#email_config. Healthchecks *does* support filtering by keywords in email message's subject line. See the "Filtering Rules" section here: https://healthchecks.io/docs/configuring_checks/
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#392
No description provided.