AxonIQ/axon-server-se

Documentation Inaccuracy: Axon Server /actuator/health Endpoint Behavior

NicolasSolveri opened this issue · 1 comments

A discrepancy was noticed in the documentation for Axon Server version 2023.x.x-dev regarding the behavior of the /actuator/health endpoint.

The documentation currently states that the /actuator/health endpoint is used to assess Axon Server and, in the case of Axon Server EE, the cluster health. It also mentions that the HTTP status is not 200 when the cluster health isn't "UP." However, in the latest version, the behavior has changed due to the cluster not auto initializing (unless the AXONIQ_AXONSERVER_STANDALONE environment variable is set to true). This could lead to misunderstanding, as even without cluster initialization, the endpoint might return a 200 status. https://docs.axoniq.io/reference-guide/axon-server/administration/monitoring/actuator-endpoints.

Here is an example to better visualize:

version: '3.9'

services:
  axonserver:
    container_name: axonserver
    image: axoniq/axonserver:2023.1.1-dev
    ports:
    - 8024:8024
    - 8124:8124

image

And here is the 200 response even though there is no cluster to be up

{"status":"UP","components":{"cluster":{"status":"UP"},"command":{"status":"UP"},"db":{"status":"UP","details":{"database":"H2","validationQuery":"isValid()"}},"diskSpace":{"status":"UP","details":{"replication-logs":{"path":"/axonserver/./log","free":283557490688,"total":481593462784},"threshold":268435456}},"license":{"status":"UP"},"livenessState":{"status":"UP"},"localEventStore":{"status":"UP"},"ping":{"status":"UP"},"query":{"status":"UP"},"raft":{"status":"UP"},"readinessState":{"status":"UP"}}}
meierw commented

This tripped us up (@NicolasSolveri and I), when creating a health check for our container. And we had to switch over to looking at the /visibleContexts endpoint instead of /actuator/health. Not a big deal, but possible that this will trip up more people in the future who are following the docs.