Skip to main content

healthcheck

Checks that the API instance and all of its dependent services are online and reports their versions, useful for diagnosing connectivity issues or confirming what’s actually deployed.

Takes no arguments or options. It connects to Neo4j, MongoDB, Elasticsearch, Redis, and RabbitMQ and reports each service’s version, verifies the S3 storage and upload buckets are reachable, reports the Alpine, Caddy, FrankenPHP, and PHP versions of the running container, the state of the element type index and the generation and build time of the compiled schema cache (not built yet until the first request needs it), and finally makes an HTTP request to the API’s own index endpoint, expecting a 200 or 429 response. If any check fails, the command throws and exits with a non-zero status instead of printing a partial report.

Help

php bin/console healthcheck --help
Description:
  Check the health of the API and required databases.

Usage:
  healthcheck

Options:
  -h, --help            Display help for the given command. When no command is given display help for the list command
      --silent          Do not output any message
  -q, --quiet           Only errors are displayed. All other output is suppressed
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -e, --env=ENV         The Environment name. [default: "prod"]
      --no-debug        Switch off debug mode.
      --profile         Enables profiling (requires debug).
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Example

php bin/console healthcheck
    ▄
  ▄▀ ▀▄  Ember Nexus API
   ▀█▀   v0.3.0, production mode

  Healthcheck

┌ Check if databases are online ────────────────────────────────────────────────
│ Neo4j version:         5.26.34 (community)
│ MongoDB version:       8.3.17
│ Elasticsearch version: 8.19.25
│ Redis version:         8.10.3
│ RabbitMQ version:      4.4.1
│ S3 provider:           MinIO
└ All databases are online.

┌ Check runtime ────────────────────────────────────────────────────────────────
│ Alpine version:        3.24.2
│ Caddy version:         2.11.9
│ FrankenPHP version:    1.13.5
│ PHP version:           8.5.13
└ Runtime is ok.

┌ Check caches and indices ─────────────────────────────────────────────────────
│ Type index:            Go extension, published version: 20261204-014633.mphf
│ Schema cache:          generation 1796348803012, not built yet
└ Caches and indices are ok.

┌ Check API ────────────────────────────────────────────────────────────────────
│ Get index endpoint is online.
└ API is ok.

▶ Status is ok.