2022-04-15 13:44:08 +00:00
---
title: "Traefik Ping Documentation"
description: "In Traefik Proxy, Ping lets you check the health of your Traefik instances. Read the technical documentation for configuration examples and options."
---
2019-02-26 13:50:07 +00:00
# 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-02-26 13:50:07 +00:00
2019-07-22 07:58:04 +00:00
```yaml tab="File (YAML)"
ping: {}
```
2021-06-18 22:08:08 +00:00
```toml tab="File (TOML)"
[ping]
```
2019-07-22 07:58:04 +00:00
```bash tab="CLI"
--ping=true
```
2019-02-26 13:50:07 +00:00
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]` .
2020-03-13 17:12:04 +00:00
The `entryPoint` where the `/ping` is active can be customized with the `entryPoint` option,
whose default value is `traefik` (port `8080` ).
2019-09-06 13:08:04 +00:00
2019-03-26 15:32:06 +00:00
| Path | Method | Description |
|---------|---------------|-----------------------------------------------------------------------------------------------------|
2024-01-02 16:30:06 +00:00
| `/ping` | `GET` , `HEAD` | An endpoint to check for Traefik process liveness. Return a code `200` with the content: `OK` |
2019-02-26 13:50:07 +00:00
2019-10-07 13:12:05 +00:00
!!! 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-02-26 13:50:07 +00:00
2020-03-13 17:12:04 +00:00
_Optional, Default="traefik"_
2019-09-06 13:08:04 +00:00
Enabling /ping on a dedicated EntryPoint.
```yaml tab="File (YAML)"
entryPoints:
ping:
address: ":8082"
ping:
entryPoint: "ping"
```
2021-06-18 22:08:08 +00:00
```toml tab="File (TOML)"
[entryPoints]
[entryPoints.ping]
address = ":8082"
[ping]
entryPoint = "ping"
```
2019-09-06 13:08:04 +00:00
```bash tab="CLI"
2019-11-19 09:18:05 +00:00
--entryPoints.ping.address=:8082
--ping.entryPoint=ping
2019-09-06 13:08:04 +00:00
```
2019-11-14 15:40:05 +00:00
2019-12-10 15:12:06 +00:00
### `manualRouting`
2019-11-14 15:40:05 +00:00
_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.
```yaml tab="File (YAML)"
ping:
manualRouting: true
```
2021-06-18 22:08:08 +00:00
```toml tab="File (TOML)"
[ping]
manualRouting = true
```
2019-11-14 15:40:05 +00:00
```bash tab="CLI"
--ping.manualrouting=true
```
2020-07-01 12:40:04 +00:00
### `terminatingStatusCode`
_Optional, Default=503_
During the period in which Traefik is gracefully shutting down, the ping handler
2024-01-02 16:30:06 +00:00
returns a `503` status code by default.
If Traefik is behind, for example a load-balancer
2020-07-01 12:40:04 +00:00
doing health checks (such as the Kubernetes LivenessProbe), another code might
2024-01-02 16:30:06 +00:00
be expected as the signal for graceful termination.
In that case, the terminatingStatusCode can be used to set the code returned by the ping
2020-07-01 12:40:04 +00:00
handler during termination.
```yaml tab="File (YAML)"
ping:
terminatingStatusCode: 204
```
2021-06-18 22:08:08 +00:00
```toml tab="File (TOML)"
[ping]
terminatingStatusCode = 204
```
2020-07-01 12:40:04 +00:00
```bash tab="CLI"
--ping.terminatingStatusCode=204
```