Skip to content

Support standard health check endpoint #1593

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

Open
cruftex opened this issue May 5, 2025 · 1 comment
Open

Support standard health check endpoint #1593

cruftex opened this issue May 5, 2025 · 1 comment

Comments

@cruftex
Copy link

cruftex commented May 5, 2025

Describe the problem to be solved

I would like to include the application in our monitoring system.

Describe the solution you would like

Support standard health check endpoints, e.g. like the one defined by Kubernetes, (livez and readyz)
https://kubernetes.io/docs/reference/using-api/health-checks/

Alternatively it could be exposed via the API. Here is an example:
https://admin-docs.zammad.org/en/latest/system/monitoring.html

That should not be too difficult, maybe I am able to craft a PR based on what is already there in the admin section. Thoughts?

@paulfitz
Copy link
Member

paulfitz commented May 5, 2025

There is a /status endpoint, though I'm sure it could be elaborated and brought more into alignment with applicable standards.

public addHealthCheck() {
if (this._check('health')) { return; }
// Health check endpoint. if called with /hooks, testing hooks are required in order to be
// considered healthy. Testing hooks are used only in server started for tests, and
// /status/hooks allows the tests to wait for them to be ready.
// If db=1 query parameter is included, status will include the status of DB connection.
// If redis=1 query parameter is included, status will include the status of the Redis connection.
// If docWorkerRegistered=1 query parameter is included, status will include the status of the
// doc worker registration in Redis.
this.app.get('/status(/hooks)?', async (req, res) => {

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