Traefik
Common parts of every card (states, backoff, Unit and ExecReload, Test config, manual commands) are described in Monitor window.
| Detected by | systemd units traefik or binaries traefik |
| Read every | 60 s while the Monitor window shows the tab |
| Active probe | yes, off by default |
| Test config | none |
| Manual commands | 2 |
What the card reads and shows
Section titled “What the card reads and shows”Traefik: entry points, providers, API settings and ACME resolvers of the static configuration; routers, services (server URLs) and middlewares (name and type only) of the file provider; the version; and, with the active probe, routers and services as Traefik runs them (status, errors, servers UP/DOWN) from its API.
Passive: on the host the probe finds the running traefik process (/proc/<pid>/comm, real and effective uid of root or the traefik account, the same PID namespace, a trusted exe); only a closed list of its flags is used (traefik/filter.awk in flags mode). The static configuration is the first of: --configFile of the process, of the unit (no process), /etc/traefik/traefik.{toml,yaml,yml}, the command-line flags, the unit’s listed flags and TRAEFIK_* keys (as in Traefik, a file wins over flags and flags over the environment). traefik/reader.sh reads the static file and the file provider’s directory or file through the filter, which prints only listed keys with checked values and stops at YAML/TOML it does not understand (fail closed). acme.json is never opened: only its mode, size and time.
Active (off by default): GET /api/overview, /api/http/routers and /api/http/services with curl on 127.0.0.1:<port> of the traefik entry point, only with api.insecure set and no middlewares on that entry point (an API behind authentication is not asked); the answers go through jq with a closed list of fields (no jq: nothing is asked).
Card layout
Section titled “Card layout”- Traefik
with the binary, Processes used: N (orange Version not read: … for an untrusted binary). - Static configuration: the file and where it came from, for example –configFile of the running traefik process, Traefik’s default path in /etc/traefik, command-line flags of the running process (listed flags only), TRAEFIK_* keys of the unit (the process has no flags), a file of another format (not read).
- Problems while reading the configuration (N) in orange, with file and line.
- Entry points (name and address;
traefikwithout an address is :8080 (default); (with middlewares)), Providers (with the file provider’s file or directory), API (enabled; insecure …; dashboard … or not enabled (no api section)), access log. A key present but empty is shown in orange as empty key (null): Traefik may ignore it. - Certificate resolvers (ACME): name, challenges, DNS provider and the storage file:
exists, mode 600, N bytes, changed ; another mode is orange with (Traefik requires 600
and refuses other modes); does not exist yet (Traefik creates it at the first certificate);
orange not reachable by this account (…).
acme.jsonitself is never opened.
File provider: N routers, N services, N middlewares (from the files):
| Column | Content |
|---|---|
| Router | Name; click for middlewares, priority and file. Orange defined in N places for duplicates. |
| Rule → service | The rule when it uses only Host/PathPrefix, otherwise ? (not only Host/PathPrefix: stays on the host); the service or no service. |
| Entry points | Listed entry points, or all. |
| TLS | The router’s TLS setting, or no. |
Services in files: N (expandable): name, type, health check, server URLs.
With the active probe, Routers and services (API): asked the API at 127.0.0.1:/api/overview with (N with errors) in red and (N with warnings) in orange.
| Table | Columns | Colours |
|---|---|---|
| Routers | Router (with middlewares), Rule → service ((TLS)), Entry points, State (status and error) | Red: disabled or an error. Orange: any status other than enabled. |
| Services | Service (click for the servers: UP, DOWN in red, no status (not in serverStatus)), Type, Servers (N servers: N UP, N not UP), State |
Red: disabled, or servers down and none up. Orange: some servers not up, an error, or a status other than enabled. |
Active probe
Section titled “Active probe”Runs: GET /api/overview, /api/http/routers and /api/http/services of Traefik’s API with curl on 127.0.0.1 or [::1] (lists with ?per_page=300; curl -q –noproxy ‘*’ –max-time 5 –proto =http –max-redirs 0, clean environment, under GNU timeout), only when a traefik process runs in KryoDesk’s PID namespace and the static configuration sets api.insecure and the traefik entry point listens on all addresses or loopback without middlewares; an API behind a router with authentication is not asked. The answers go through jq (needed: without it nothing is asked) and only names, providers, status, rules made of Host/PathPrefix, entry points, middleware names, server URLs without userinfo or query, UP/DOWN and errors from a closed list of templates (any other error only as its length) leave the host. Every 60 s while the Monitor is open
Traces on the host: three HTTP requests per run on the traefik entry point: lines in Traefik’s access log when it is on (Traefik v3 logs requests to its own API only with accessLog.addInternals), metrics and tracing of internal routers when enabled; an HTTP 401/403 stops the probe until Retry
Test config
Section titled “Test config”None: Traefik has no option that only checks the configuration: traefik with a configuration starts the proxy (binds the entry points, starts the providers, asks ACME). Errors of the dynamic configuration are visible in the API (routers and services with an error; the active probe) and in Traefik’s log (command below).
Manual commands
Section titled “Manual commands”KryoDesk shows these with Copy / Paste to terminal and never runs them.
| Label | Command | What it does |
|---|---|---|
| Traefik’s log of the last hour | journalctl -u <unit> --since -1h --no-pager |
configuration errors (also of the file provider: a file Traefik cannot parse, a missing service or middleware) are in Traefik’s log; prints the unit’s journal of the last hour (with the access log on stdout it also holds request lines) |
| Routers from the API, unfiltered | curl -sS -g --noproxy * --max-time 5 <url> |
the raw JSON of the routers as Traefik runs them (rules, middleware names, errors as Traefik writes them, which may quote configuration values); the request is in Traefik’s access log when it logs internal routers |