Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Health Checks #1620

Open
djpiper28 opened this issue May 2, 2024 · 3 comments
Open

馃殌 Health Checks #1620

djpiper28 opened this issue May 2, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@djpiper28
Copy link

Is your feature request related to a problem? Please describe.
Sometimes the bot will not respond to commands, and requires a restart. I run the app within a kubernetes cluster and ideally it will have the ability to add a healthcheck so that my cluster can restart the bot when it isn't working.

Describe the solution you'd like
The bot runs an express server (or similar), with a singular healthcheck endpoint. This tries to ping discord, if it can it returns a 200 code, otherwise a 500 code. This means my cluster can detect failure and restart the offending pod.

Describe alternatives you've considered
n/a

Additional context
App runs in kubernetes.

@djpiper28 djpiper28 added the enhancement New feature or request label May 2, 2024
@eritislami
Copy link
Owner

I understand your need for this change but I feel it is outside of the needs of the average user, adding an entire express server to the project feels to me like it is outside of the domain of the project, it's more so something end-users can implement on their own, as for now the bot does have a ping command which returns the API latency to Discord.

@djpiper28
Copy link
Author

I understand your need for this change but I feel it is outside of the needs of the average user, adding an entire express server to the project feels to me like it is outside of the domain of the project, it's more so something end-users can implement on their own, as for now the bot does have a ping command which returns the API latency to Discord.

If I were to add this feature and put it behind a feature flag that defaults to disabled is that okay?

@eritislami
Copy link
Owner

eritislami commented May 23, 2024

I understand your need for this change but I feel it is outside of the needs of the average user, adding an entire express server to the project feels to me like it is outside of the domain of the project, it's more so something end-users can implement on their own, as for now the bot does have a ping command which returns the API latency to Discord.

If I were to add this feature and put it behind a feature flag that defaults to disabled is that okay?

For this repository my main point is that i don't want to accept a PR for something that i don't feel comfortable maintaining, I think a more lightweight solution would be to run a restart command via PM2 to restart the bot since that is something that i am more familiar with, if not then you are free to modify the code in your version of the bot.

Perhaps it can be added to the ping command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants