Skip to main content

Traefik Hub Gateway Dashboard and API

The dashboard is the central place that shows you the current active routes handled by Traefik Hub.

https://dev.example.com/dashboard/

Dashboard Overview.

Configuration

The API and the dashboard can be configured:

  • In the Helm Chart: You can find the options to customize the Traefik Hub API Gateway installation enabing the dashboard here.
  • In the Traefik Hub API Gateway Static Configuration as describe below.
FieldDescriptionDefaultRequired
apiEnable api/dashboard. If the option api.dashboard is set to true, this option is by default set to true too and should not be explicitly set to false.falseNo
api.dashboardEnable dashboardfalseNo
api.debugEnable additional endpoints for debugging and profiling.falseNo
api.disabledashboardadDisable the advertisement from the dashboard.falseNo
api.insecureEnable the API and the dashboard on the entryPoint named traefik.falseNo

Endpoints

All the following endpoints must be accessed with a GET HTTP request.

PathDescription
/api/http/routersLists all the HTTP routers information.
/api/http/routers/{name}Returns the information of the HTTP router specified by name.
/api/http/servicesLists all the HTTP services information.
/api/http/services/{name}Returns the information of the HTTP service specified by name.
/api/http/middlewaresLists all the HTTP middlewares information.
/api/http/middlewares/{name}Returns the information of the HTTP middleware specified by name.
/api/tcp/routersLists all the TCP routers information.
/api/tcp/routers/{name}Returns the information of the TCP router specified by name.
/api/tcp/servicesLists all the TCP services information.
/api/tcp/services/{name}Returns the information of the TCP service specified by name.
/api/tcp/middlewaresLists all the TCP middlewares information.
/api/tcp/middlewares/{name}Returns the information of the TCP middleware specified by name.
/api/udp/routersLists all the UDP routers information.
/api/udp/routers/{name}Returns the information of the UDP router specified by name.
/api/udp/servicesLists all the UDP services information.
/api/udp/services/{name}Returns the information of the UDP service specified by name.
/api/entrypointsLists all the entry points information.
/api/entrypoints/{name}Returns the information of the entry point specified by name.
/api/overviewReturns statistic information about HHTP, TCP and about enabled features and providers.
/api/rawdataReturns information about dynamic configurations, errors, status and dependency relations.
/api/versionReturns information about Traefik version.
/debug/varsSee the expvar Go documentation.
/debug/pprof/See the pprof Index Go documentation.
/debug/pprof/cmdlineSee the pprof Cmdline Go documentation.
/debug/pprof/profileSee the pprof Profile Go documentation.
/debug/pprof/symbolSee the pprof Symbol Go documentation.
/debug/pprof/traceSee the pprof Trace Go documentation.

More Information

The dashboard is available at the same location as the API but on the path /dashboard/ by default.

warning

The trailing slash / in /dashboard/ is mandatory. This limitation can be mitigated using the RedirectRegex Middleware

note

There is also a redirect of the path / to the path /dashboard/, but one should not rely on that property as it is bound to change, and it might make for confusing routing rules anyway.

Then define a routing configuration on Traefik Hub itself, with a router attached to the service api@internal to allow defining:

Dashboard Router Rule

The router rule defined for Traefik Hub must match the path prefixes /api and /dashboard.

We recommend using a Host Based rule to match everything on the host domain, or to make sure that the defined rule captures both prefixes:

# The dashboard can be accessed on http://dev.example.com/dashboard/
rule = "Host(`dev.example.com`)"

Dashboard Configuration

Example of an deployment file:

Kubernetes
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: traefik-dashboard
spec:
routes:
- match: Host(`dev.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))
kind: Rule
services:
- name: api@internal
kind: TraefikService
middlewares:
- name: auth-oidc
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: auth-oidc
spec:
plugin:
oidc:
issuer: "https://tenant.auth0.com/realms/myrealm"
redirectUrl: "/callback"
clientID: my-oidc-client-name
clientSecret: mysecret