traefik/docs/content/operations/cli.md
Ludovic Fernandez fe68e9e243 New constraints management.
Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
2019-06-21 09:24:04 +02:00

1.1 KiB

CLI

The Traefik Command Line {: .subtitle }

General

traefik [command] [flags] [arguments]

Use traefik [command] --help for help on any command.

Commands:

  • healthcheck Calls Traefik /ping to check the health of Traefik (the API must be enabled).
  • version Shows the current Traefik version.

Flag's usage:

# set flag_argument to flag(s)
traefik [--flag=flag_argument] [-f [flag_argument]]

# set true/false to boolean flag(s)
traefik [--flag[=true|false| ]] [-f [true|false| ]]

healthcheck

Calls Traefik /ping to check the health of Traefik. Its exit status is 0 if Traefik is healthy and 1 otherwise.

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.

Usage:

traefik healthcheck [command] [flags] [arguments]

Example:

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

version

Shows the current Traefik version.

Usage:

traefik version