Check that the platforms are healthy
The health endpoints of XTM One, OpenCTI and OpenAEV, what each answer means, and how to use them in Docker Compose, Kubernetes or a load balancer.
Each platform of the XTM stack has an HTTP endpoint that says whether it can serve requests. This page lists them, says what each answer means and how to call them, so that Docker Compose, Kubernetes or a load balancer restarts a platform or stops sending it traffic at the right time.
- Orchestrator → OpenCTI: /health with key
- Orchestrator → OpenAEV: /api/health with key
- Orchestrator → XTM One: /api/health
- OpenCTI → Elasticsearch and Redis: checks
- OpenCTI → RabbitMQ and S3 storage: checks
- OpenAEV → RabbitMQ and S3 storage: checks
- OpenAEV → PostgreSQL: checks
The endpoints
| Platform | Endpoint | Key | Answers 200 when |
|---|---|---|---|
| XTM One | /api/health, on its port (4000 in the container, XTM_ONE_PORT on the host) | None | The application is up |
| OpenCTI | /health?health_access_key=<key>, on its port (8080 in the container, OPENCTI_PORT on the host) | APP__HEALTH_ACCESS_KEY, from OPENCTI_HEALTHCHECK_ACCESS_KEY in .env | Elasticsearch, S3 storage, RabbitMQ and Redis all answer |
| OpenAEV | /api/health?health_access_key=<key>, on its port (8080 in the container, 8081 on the host) | OPENAEV_HEALTHCHECK_KEY in .env | PostgreSQL, RabbitMQ and S3 storage answer |
The healthchecks of docker-compose.yml call these same endpoints, and docker compose ps shows their result. The workers, connectors, collectors and injectors of a platform, and XTM Composer, wait for it to be healthy before they start.
Check the platforms by hand
From the xtm-docker folder:
set -a; . ./.env; set +a
curl -fsS "http://localhost:$XTM_ONE_PORT/api/health" && echo
curl -fsS "http://localhost:$OPENCTI_PORT/health?health_access_key=$OPENCTI_HEALTHCHECK_ACCESS_KEY" && echo
curl -fsS "http://localhost:8081/api/health?health_access_key=$OPENAEV_HEALTHCHECK_KEY" && echo
The host port of OpenAEV is written in docker-compose.yml (8081:8080), not taken from OPENAEV_PORT: OPENAEV_PORT only builds its public URL. If you change one, change the other.
OpenCTI and OpenAEV answer {"status":"success"}. A platform you did not start fails to connect.
What the answers mean
| Answer | Meaning |
|---|---|
200 {"status":"success"} | The platform and its four dependencies are up |
503 with an error | A dependency is down, or the platform has not finished starting |
401 {"status":"unauthorized"} | The key is wrong, or the platform has no key: an empty key and the default ChangeMe refuse every call |
Set the key to public to answer without a key. Use it only on a network you trust.
Each call checks the four dependencies, with a timeout of 15 seconds each.
| Answer | Meaning |
|---|---|
200 {"status":"success"} | PostgreSQL, RabbitMQ and S3 storage are up |
503 | One of them is down, or has not been checked for three intervals |
401 | The key is missing or wrong |
OpenAEV checks its dependencies in the background, every openaev.healthcheck.connectivity-probe-interval (default PT10S, ten seconds), and the endpoint returns the last result. Elasticsearch is checked too, but its failure does not turn the answer into 503: OpenAEV can still serve requests without it. Add &details=true to also get the storage used in PostgreSQL, Elasticsearch and S3.
The default key of OpenAEV is ChangeMe, and OpenAEV accepts it. In xtm-docker, the platform falls back to it when OPENAEV_HEALTHCHECK_KEY is not set in .env. Set your own value.
XTM One answers on /api/health without a key. The healthcheck of xtm-docker marks it unhealthy when the endpoint does not answer or answers with an HTTP error.
In 7.260811 LTS: OpenCTI liveness probe
Use the probes in Kubernetes
For OpenAEV, use /api/health?health_access_key=<your key> on port 8080, and for XTM One, /api/health on port 4000.
What's next
- Observability metrics, to follow the dependencies over time.
- Scale: workers, platforms and clusters, to run several OpenCTI nodes behind a load balancer.
- Troubleshoot the XTM stack, when a platform stays unhealthy.
- HTTP endpoints: every endpoint OpenCTI serves besides GraphQL, health and metrics included.