dependency-track icon indicating copy to clipboard operation
dependency-track copied to clipboard

Add health-check urls

Open davidkarlsen opened this issue 4 years ago • 4 comments

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.

davidkarlsen avatar Apr 06 '21 08:04 davidkarlsen

For liveness and startup probes we are actually using /api/version

For readiness it can be similar to #1002

mvanini avatar Apr 06 '21 11:04 mvanini

Will that url respond even if DT has trouble connecting to the DB?

davidkarlsen avatar Apr 06 '21 12:04 davidkarlsen

Most health checks will need to be implemented in https://github.com/stevespringett/Alpine/issues/22

stevespringett avatar Apr 06 '21 14:04 stevespringett

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'}

bodaduk avatar May 20 '22 10:05 bodaduk

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.

nscuro avatar Mar 29 '23 19:03 nscuro

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.

github-actions[bot] avatar May 05 '23 10:05 github-actions[bot]