Clean Documentation
This commit is contained in:
parent
8ac8473554
commit
1997bc7432
77 changed files with 2561 additions and 1247 deletions
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
title: "Traefik Health Check CLI Command Documentation"
|
||||
description: "In Traefik Proxy, the healthcheck CLI command lets you check the health of your Traefik instances. Read the technical documentation for configuration examples and options."
|
||||
---
|
||||
|
||||
# Healthcheck Command
|
||||
|
||||
Checking the Health of your Traefik Instances.
|
||||
{: .subtitle }
|
||||
|
||||
## Usage
|
||||
|
||||
The healthcheck command allows you to make a request to the `/ping` endpoint (defined in the install (static) configuration) to check the health of Traefik. Its exit status is `0` if Traefik is healthy and `1` otherwise.
|
||||
|
||||
This can be used with [HEALTHCHECK](https://docs.docker.com/engine/reference/builder/#healthcheck) instruction or any other health check orchestration mechanism.
|
||||
|
||||
```sh
|
||||
traefik healthcheck [command] [flags] [arguments]
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```sh
|
||||
$ traefik healthcheck
|
||||
OK: http://:8082/ping
|
||||
```
|
||||
|
||||
The command uses the [ping](./ping.md) endpoint that is defined in the Traefik install (static) configuration.
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
---
|
||||
title: "Traefik Ping Option Documentation"
|
||||
description: "In Traefik Proxy, the option Ping lets you check the health of your Traefik instances. Read the technical documentation for configuration examples and options."
|
||||
---
|
||||
|
||||
# Ping
|
||||
|
||||
Checking the Health of your Traefik Instances
|
||||
{: .subtitle }
|
||||
|
||||
The `ping` options allows you to enable the ping endpoint to check Traefik liveness.
|
||||
|
||||
The ping endpoint is reachable using the path `/ping` and the methods `GET`and `HEAD`.
|
||||
|
||||
If the Traefik instance is alive, it returns the `200` HTTP code with the content: `OK`.
|
||||
|
||||
## Configuration Example
|
||||
|
||||
To enable the API handler:
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
ping: {}
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[ping]
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--ping=true
|
||||
```
|
||||
|
||||
## Configuration Options
|
||||
|
||||
The `ping` option is defined in the install (static) configuration.
|
||||
You can define it using the same [configuration methods](../../boot-environment.md#configuration-methods) as Traefik.
|
||||
|
||||
| Field | Description | Default | Required |
|
||||
|:------|:----------------------------------------------------------|:---------------------|:---------|
|
||||
| `ping.entryPoint` | Enables `/ping` on a dedicated EntryPoint. | traefik | No |
|
||||
| `ping.manualRouting` | Disables the default internal router in order to allow one to create a custom router for the `ping@internal` service when set to `true`. | false | No |
|
||||
| `ping.terminatingStatusCode` | Defines the status code for the ping handler during a graceful shut down. See more information [here](#terminatingstatuscode) | 503 | No |
|
||||
|
||||
### `terminatingStatusCode`
|
||||
|
||||
During the period in which Traefik is gracefully shutting down, the ping handler
|
||||
returns a `503` status code by default.
|
||||
If Traefik is behind, for example a load-balancer
|
||||
doing health checks (such as the Kubernetes LivenessProbe), another code might
|
||||
be expected as the signal for graceful termination.
|
||||
In that case, the terminatingStatusCode can be used to set the code returned by the ping
|
||||
handler during termination.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
ping:
|
||||
terminatingStatusCode: 204
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[ping]
|
||||
terminatingStatusCode = 204
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--ping.terminatingStatusCode=204
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue