Sign inSign up

rezepoge/traefik-overview

By rezepoge

•Updated over 1 year ago

A simple overview for traefik proxy to view all routers and their access log.

Image
Developer tools
Web servers
Monitoring & observability
0

719

rezepoge/traefik-overview repository overview

⁠Description

traefik-overview is a simple overview for the traefik proxy to view all routers and their access log.

you can find me on the most social media by @rezepoge including github https://github.com/rezepoge⁠

feel free to contact me regarding questions or ideas for this or other projects.

the code base of this project remains in a private repo for now, this may change in the future.

⁠Sceenshots

⁠Router Overview

Router Overview

⁠Router Access Log

Router Access Log

⁠How to use

⁠traefik.yml

accessLog:
    format: json
    filePath: '/var/log/access.log'
    bufferingSize: 1000
    fields:
        defaultMode: keep
        names:
            ClientUsername: drop
        headers:
            defaultMode: drop
            names:
                User-Agent: keep
                Content-Type: keep
api:
    dashboard: true
    insecure: true

⁠compose.yaml

services:
  traefik:
     [...]
     labels:
         [...]
         traefik.http.routers.traefik.service: api@internal
         traefik.http.routers.traefik.middlewares: myauth
         traefik.http.middlewares.myauth.basicauth.users: ${MY_AUTH}
     [...]
  traefik-overview:
    image: rezepoge/traefik-overview
    container_name: traefik-overview
    restart: unless-stopped
    environment:
      - TZ=Europe/Berlin
      - OVERVIEW_AUTH=${OVERVIEW_AUTH}
      - TRAEFIK_HOST=http://traefik:8080
      - TRAEFIK_USER=${BASIC_AUTH_USER}
      - TRAEFIK_PASSWORD=${BASIC_AUTH_PASSWORD}
      - LOGS_PATH=/var/log
    volumes:
      - ./logs:/var/log
    labels:
      - traefik.enable=true
      - traefik.http.routers.traefik-overview.rule=Host(`traefik-overview.example.com`)
      - traefik.http.routers.traefik-overview.entrypoints=websecure
      - traefik.http.routers.traefik-overview.tls.certresolver=myresolver
    deploy:
      resources:
        limits:
          cpus: "0.5"
          memory: 1g
        reservations:
          cpus: "0.3"
          memory: 256m
    depends_on:
      - traefik
    networks:
      - default
networks:
  default: {}
  traefik:
    enable_ipv6: true
    external: true

⁠.env

OVERVIEW_AUTH='*USERNAME*:*BLOWFISH_CRYPTED_PASSWORD*'
BASIC_AUTH_USER=*TRAEFIK_BASIC_AUTH_USERNAME*
BASIC_AUTH_PASSWORD=*TRAEFIK_BASIC_AUTH_PASSWORD*

Tag summary

Content type

Image

Digest

sha256:01fe47349…

Size

53.3 MB

Last updated

over 1 year ago

docker pull rezepoge/traefik-overview