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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Health check endpoint #1288

Open
LabodiDavid opened this issue Nov 25, 2023 · 1 comment
Open

Health check endpoint #1288

LabodiDavid opened this issue Nov 25, 2023 · 1 comment

Comments

@LabodiDavid
Copy link

Is your feature request related to a problem? Please describe.

I'm running pufferpanel in docker and planning to monitor the health status of the container and I ran into the fact that there is no dedicated solution or an endpoint to check for the service health.

Describe the solution you'd like

A /health endpoint would be useful, both in a normal environment and in a docker environment for monitoring.
It should check the connection state of the database, the daemon, and any other aspects that consider pufferpanel to be in a healthy state.

Describe alternatives you've considered
Currently, I'm checking the container's health like this:

healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080"]
      interval: 30s
      retries: 3
      timeout: 10s

However, this is unreliable because, for example, it may report a healthy status even if it doesn't reach the database.

@LordRalex
Copy link
Member

The issue is that in the grand scheme of how healthchecks should work, that is exactly what it should be.

If you are doing checks like this, ideally, you'd actually move the database to be it's own container, and so it would have it's own healthcheck. Which ensures that the DB part of the "service" is online.

I don't really want to add a method that does DB calls that isn't behind auth or otherwise requires specific data to get past. While this won't hurt anything, it's not ideal.

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

No branches or pull requests

2 participants