traefik/docs/content/operations/ping.md

81 lines
1.7 KiB
Markdown
Raw Normal View History

# Ping
Checking the Health of Your Traefik Instances
{: .subtitle }
## Configuration Examples
2019-09-09 08:36:08 +00:00
To enable the API handler:
2019-07-22 07:58:04 +00:00
```toml tab="File (TOML)"
[ping]
```
```yaml tab="File (YAML)"
ping: {}
```
```bash tab="CLI"
--ping=true
```
2019-09-06 13:08:04 +00:00
## Configuration Options
The `/ping` health-check URL is enabled with the command-line `--ping` or config file option `[ping]`.
You can customize the `entryPoint` where the `/ping` is active with the `entryPoint` option (default value: `traefik`)
| Path | Method | Description |
|---------|---------------|-----------------------------------------------------------------------------------------------------|
| `/ping` | `GET`, `HEAD` | A simple endpoint to check for Traefik process liveness. Return a code `200` with the content: `OK` |
!!! note
The `cli` comes with a [`healthcheck`](./cli.md#healthcheck) command which can be used for calling this endpoint.
2019-09-06 13:08:04 +00:00
### `entryPoint`
2019-09-06 13:08:04 +00:00
Enabling /ping on a dedicated EntryPoint.
```toml tab="File (TOML)"
[entryPoints]
[entryPoints.ping]
address = ":8082"
[ping]
entryPoint = "ping"
```
```yaml tab="File (YAML)"
entryPoints:
ping:
address: ":8082"
ping:
entryPoint: "ping"
```
```bash tab="CLI"
--entryPoints.ping.address=:8082
--ping.entryPoint=ping
2019-09-06 13:08:04 +00:00
```
2019-12-10 15:12:06 +00:00
### `manualRouting`
_Optional, Default=false_
If `manualRouting` is `true`, it disables the default internal router in order to allow one to create a custom router for the `ping@internal` service.
```toml tab="File (TOML)"
[ping]
manualRouting = true
```
```yaml tab="File (YAML)"
ping:
manualRouting: true
```
```bash tab="CLI"
--ping.manualrouting=true
```