mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 15:05:49 +03:00
[GH-ISSUE #138] Cant find the Discord integration #95
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#95
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 @TheFonix on GitHub (Oct 17, 2017).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/138
So ive built the HealthCheck app locally but cant seems to find the Discord integration option? Am i missing something here?
Thanks!
@cuu508 commented on GitHub (Oct 17, 2017):
Hi @TheFonix,
have you set
DISCORD_CLIENT_IDandDISCORD_CLIENT_SECRETsettings in thelocal_settings.pyfile?You can create your Discord API credentials here: https://discordapp.com/developers/applications/me
@TheFonix commented on GitHub (Oct 17, 2017):
Ah perfect! Thank you!
@TheFonix commented on GitHub (Oct 17, 2017):
So i added them all in & Woo, the integration button pops up, but when i click the
Connect discordbutton it directs me to the discord page & tells me there was an unknown error? :(as seen here
https://imgur.com/CZAWBEQ
@cuu508 commented on GitHub (Oct 18, 2017):
When setting up the Discord app, did you specify a redirect URI?
If you're experimenting locally, and your server is running on localhost:8000 then the correct redirect URI would be
http://localhost:8000/integrations/add_discord/@TheFonix commented on GitHub (Oct 18, 2017):
I still seem to get the same issue, im running it globally now, which can be accessed through https://sanity.corinthmc.com Its running through a reverse proxy on Nginx
@TheFonix commented on GitHub (Oct 18, 2017):
in the redirects i currently have
https://sanity.corinthmc.com/integrations/add_discord/just for reference@cuu508 commented on GitHub (Oct 19, 2017):
The redirect URL looks fine. Can you show the URL of the page with "UNKNOWN_ERROR"?
@TheFonix commented on GitHub (Oct 20, 2017):
The URL is directs me to is:
https://discordapp.com/oauth2/authorize?response_type=code&redirect_uri=https%3A%2F%2Fsanity.corinthmc.com%2Fintegrations%2Fadd_discord%2F&client_id=369875152080470016&scope=webhook.incoming&state=lumeMSbI9KHM@cuu508 commented on GitHub (Oct 20, 2017):
The discordapp.com URL looks good too...
Another thing to check: when you are on the UNKNOWN_ERROR page, open developer tools and in the Network tab look for a
authorizecall and see what status code and response body it returns.As an example, here's what I get if I change redirect_uri slightly:
@cuu508 commented on GitHub (Oct 20, 2017):
Realized I can take the URL you posted and check this myself.
The error message for your URL is
Invalid OAuth2 redirect_urialso.Can you double check that the redirect URL in the Discord app is indeed
https://sanity.corinthmc.com/integrations/add_discord/? The http / https in the protocol matters. If you had created several Discord apps, make sure you're ussing the correctclient_idvalue.@TheFonix commented on GitHub (Oct 20, 2017):
Oh my goodness! After far too many hours of working on this it was down to the reverse proxy i was using not correctly applying SSL to the URL, Thank you so much for all of your help!
@TheFonix commented on GitHub (Oct 20, 2017):
So, just to keep you on your toes, i got the bot to join discord & i deleted the channel for it to post to but sadly it doesn't send any messages to the discord when something goes down or comes up, ive check through all the settings in the online page, but they are all set to alert when the service goes down, & ive double checked the bot has read & write permissions to the channel its using, anything else im missing here? Not sure if this is related but the bot shows as being
offlinein the discord serverSorry to be a pain
@cuu508 commented on GitHub (Oct 20, 2017):
No worries, just means there's more work to do on documentation side here ;-)
First thing to check: do you have
manage.py sendalertscommand running? It's the command responsible for monitoring check states and sending alerts. In a server environment I would use either supervisor or systemd to start it up and keep it running. For testing purposes you can just run it in a shell or a screen session.https://github.com/healthchecks/healthchecks#sending-status-notifications
@TheFonix commented on GitHub (Oct 20, 2017):
So, im not able to see it running & doing
/manage.py sendalertsReturns this:@cuu508 commented on GitHub (Oct 20, 2017):
Looks like the virtualenv is not activated. Try this:
For supervisor & systemd you would use a command like this:
The above command is using virtualenv's python executable, instead of the system-global python.
@TheFonix commented on GitHub (Oct 21, 2017):
Yep that fixed it! Can confirm updates are now being sent through discord and email! Thanks man :)