mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-24 22:45:56 +03:00
[GH-ISSUE #1006] Discord Webhook integration #701
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#701
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 @r3mi on GitHub (May 25, 2024).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/1006
Originally assigned to: @alesauce on GitHub.
Hello,
thanks for healthchecks !
Would it be possible to get Discord Webhook integration ?
There are simpler to set-up than the Discord App integration.
@cuu508 commented on GitHub (May 27, 2024):
Thanks for the suggestion. I'm not sure, I feel like the existing integration is reasonably easy to set up. Is there anything specific that you found difficult?
@r3mi commented on GitHub (May 27, 2024):
Hello,
I find the App creation in Discord not completly obvious, such as: where to enter the redirect url ? (in oauth section I suspect) ; does it work if this redirect URL is not exposed to internet ? how to extract the client secret from Discord HMI ("Hidden for security") ?
In comparison, a webhook is very easy to setup (basically 1 click on the Discord channel).
Also, it would allow to propose the Discord integration without specific server configuration (
DISCORD_CLIENT_xxx), like Slack.Thanks again for this great app!
@cuu508 commented on GitHub (May 28, 2024):
Correct.
Discord will redirect your browser back to the redirect URL. As long as your browser can access the URL, it should work.
The client secret is visible and can be copied after it has been freshly generated. To access it again later you will need to reset it.
I do not plan to work on this myself but will accept a PR which implements a similar solution as the Slack integration uses:
github.com/healthchecks/healthchecks@7ef18cd706/hc/front/views.py (L1576)and https://github.com/healthchecks/healthchecks/blob/master/templates/integrations/add_slack.html)@r3mi commented on GitHub (May 30, 2024):
Thanks for the info !
Not sure I could implement it though. Maybe
@vnugent commented on GitHub (Jun 5, 2024):
I'm using the generic Webhook integration to post messages to Discord via its webhook, which I prefer over Discord app because of its simplicity and we can also using the same Discord webhook to post alerts from Prometheus & Grafana.
The issue I'm having is being able to send variables, eg $BODY or $BODY_JSON. Discord rejected the request with status 400, probably due to formatting issue. Sending a string works fine,
{ "content": "backup job down"}--

@BarronK47 commented on GitHub (Jun 7, 2024):
@vnugent I think the issue is the test message does not have any content for
$BODY.If I use the following:
{"content": "$BODY foobar"}I get the following message in Discord.
@alesauce commented on GitHub (Aug 26, 2024):
Howdy! I'd be interested in working on a PR for this issue if you'd like to assign it to me.
@cuu508 commented on GitHub (Aug 27, 2024):
Sounds good, @alesauce, you can go ahead!
@mickBoat00 commented on GitHub (Aug 28, 2024):
was about to make a pr for it. But go for it.
@naimo commented on GitHub (Feb 6, 2026):
Hi there, encountered the issue today, I was wondering if there was progress on that ?
Do we understand why the placeholder variables don't get populated ?
I'm getting error 400 when I try to just send $JSON for the POST content
@naimo commented on GitHub (Feb 6, 2026):
Ok this ended up working, I think it's just Discord being very finicky on what content it accepts
{
"content": "$NOW - $NAME is $STATUS",
"embeds": null,
"attachments": []
}
and headers
Content-Type: application/json