Skip to content

fix(openaev): align healthcheck on application-level /api/health endpoint#40

Open
RomuDeuxfois wants to merge 1 commit into
mainfrom
fix/openaev-healthcheck-alignment
Open

fix(openaev): align healthcheck on application-level /api/health endpoint#40
RomuDeuxfois wants to merge 1 commit into
mainfrom
fix/openaev-healthcheck-alignment

Conversation

@RomuDeuxfois

Copy link
Copy Markdown
Member

What

Aligns the openaev service healthcheck in docker-compose.yml with the pattern already used for opencti in the same file, and with OpenAEV-Platform/docker's own compose file.

     healthcheck:
-      test: [ "CMD", "wget", "-qO-", "http://openaev:8080/actuator/health/ping" ]
+      test: [ "CMD", "wget", "-qO-", "http://openaev:8080/api/health?health_access_key=${OPENAEV_HEALTHCHECK_KEY}" ]
       interval: 10s
       timeout: 5s
-      retries: 30
-      start_period: 120s
+      retries: 20
+      start_period: 120s

Why

  • /actuator/health/ping is a generic Spring Boot Actuator liveness probe — it only proves the JVM process responds, with no visibility into whether OpenAEV's actual dependencies (Postgres, MinIO, RabbitMQ, Elasticsearch) are reachable.
  • /api/health?health_access_key= is OpenAEV's application-level health endpoint — a real readiness check, same mechanism OpenCTI already uses in this same file (/health?health_access_key=${OPENCTI_HEALTHCHECK_ACCESS_KEY}) and the one used in OpenAEV-Platform/docker.
  • Several services depend on openaev: condition: service_healthy (xtm-composer, all collector-* and injector-* services). A liveness-only check means those consumers can start against an OpenAEV instance that's "up" but not actually ready to serve traffic (e.g. DB migration still running).
  • OPENAEV_HEALTHCHECK_KEY is already defined and injected in the openaev service environment (OPENAEV_HEALTHCHECK_KEY=${OPENAEV_HEALTHCHECK_KEY:-ChangeMe}), so no new secret/env var is introduced.

Notes

  • retries lowered from 30 → 20 to match OpenAEV-Platform/docker.
  • start_period: 120s kept: this is now a real app-level readiness check (DB/ES/MinIO init), which can reasonably take longer to go green than a bare actuator ping — happy to drop it if we'd rather match OpenAEV-Platform/docker exactly (no start_period there).

Scope / impact

  • Infra-only change (docker-compose.yml), no application code touched.
  • No CE/EE impact, no public API breaking change, no multi-tenancy impact.
  • Slightly stricter startup gating for xtm-composer / collectors / injectors that wait on openaev: service_healthy — expected and desired.

Related discussion: Teams thread on healthcheck inconsistency between docker and xtm-docker repos.

…oint

Replaces the generic Spring Boot Actuator liveness ping
(`/actuator/health/ping`) with OpenAEV's own application health
endpoint (`/api/health?health_access_key=`), consistent with:
- OpenAEV-Platform/docker's docker-compose.yml
- The pattern already used for OpenCTI in this same file
  (`/health?health_access_key=${OPENCTI_HEALTHCHECK_ACCESS_KEY}`)

The actuator ping only proves the JVM process is alive; it does not
check that OpenAEV's dependencies (DB, MinIO, RabbitMQ, ES) are
actually reachable, which is what `depends_on: condition: service_healthy`
consumers (xtm-composer, collectors, injectors) actually need.

`OPENAEV_HEALTHCHECK_KEY` is already defined and injected into the
`openaev` service environment, so no new secret is introduced.

`retries` aligned to 20 to match OpenAEV-Platform/docker;
`start_period: 120s` kept since this is now a real app-level
readiness check (DB/ES/MinIO init) rather than a JVM liveness ping,
which needs more warm-up time than actuator did.
Copilot AI review requested due to automatic review settings July 2, 2026 07:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the openaev service healthcheck in docker-compose.yml to use OpenAEV’s application-level readiness endpoint (/api/health) instead of the Spring Actuator liveness ping, ensuring dependent services only start once OpenAEV is actually ready.

Changes:

  • Switched openaev healthcheck from /actuator/health/ping to /api/health?health_access_key=....
  • Reduced healthcheck.retries from 30 to 20 (kept start_period: 120s).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker-compose.yml
restart: always
healthcheck:
test: [ "CMD", "wget", "-qO-", "http://openaev:8080/actuator/health/ping" ]
test: [ "CMD", "wget", "-qO-", "http://openaev:8080/api/health?health_access_key=${OPENAEV_HEALTHCHECK_KEY}" ]
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

Successfully merging this pull request may close these issues.

2 participants