traefik/docs/content/operations/cli.md
2019-05-17 13:32:05 +02:00

1.2 KiB

CLI

The Traefik Command Line {: .subtitle }

General

traefik [command] [--flag=flag_argument]

Available commands:

  • version : Print version
  • storeconfig : Store the static Traefik configuration into a Key-value store. Please refer to the Store Traefik configuration(TODO: add doc and link) section to get documentation on it.
  • healthcheck: Calls Traefik /ping to check health.

Each command can have additional flags.

All those flags will be displayed with:

traefik [command] --help

Each command is described at the beginning of the help section:

traefik --help

# or

docker run traefik[:version] --help
# ex: docker run traefik:1.5 --help

Command: healthcheck

Checks the health of Traefik. Its exit status is 0 if Traefik is healthy and 1 if it is unhealthy.

This can be used with Docker HEALTHCHECK instruction or any other health check orchestration mechanism.

!!! note The ping endpoint must be enabled to allow the healthcheck command to call /ping.

traefik healthcheck
OK: http://:8082/ping