mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 06:55:53 +03:00
[GH-ISSUE #543] Signaling successes and failures with the request body #392
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#392
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
statusfield in that JSON body to signal a success (resolved) or a failure (firing).@cuu508 commented on GitHub (Jul 29, 2021):
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.
@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.
@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/