dependency-track
dependency-track copied to clipboard
Add health-check urls
Current Behavior:
No [documented] endpoints for health checks
Proposed Behavior:
add health-probes which can be used to monitor the app and it's state.
For liveness and startup probes we are actually using /api/version
For readiness it can be similar to #1002
Will that url respond even if DT has trouble connecting to the DB?
Most health checks will need to be implemented in https://github.com/stevespringett/Alpine/issues/22
Will that url respond even if DT has trouble connecting to the DB?
This is the issue I have, /api/version still responds despite many logged db connection and other exceptions. This means health checks still pass and self healing/recovery doesn't occur.
The healthcheck we use in compose:
healthcheck: test: ["CMD", "curl", "-I", "-X", "GET", "http://localhost:8080/api/version"] interval: ${ComposeARGHealthCheckInterval:-'5m'} timeout: ${ComposeARGHealthCheckTimeout:-'30s'} retries: ${ComposeARGHealthCheckRetries:-'3'} start_period: ${ComposeARGHealthCheckStartPeriod:-'0s'}
I raised a PR for this in Alpine: https://github.com/stevespringett/Alpine/pull/480
This will support all the various /health, /health/live, /health/ready, and /health/started endpoints.
The PR includes readiness check for database connections, but nothing else for now.
We'll need to work out other areas of the system that we can add checks for, but at least a foundation is laid.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.