A beautiful terminal-based dashboard for analyzing Traefik access logs in real-time. Built with Bubble Tea for an interactive TUI experience.
- Real-time Dashboard - Interactive terminal UI with multiple visualization cards
- Multiple Data Sources - Read from log files, connect to Traefik Analytics Agent, or use demo data
- Rich Metrics - Request rates, response times, status codes, error rates, and more
- Beautiful UI - Clean, modern interface with color-coded indicators and progress bars
- Fast & Efficient - Optimized log parsing with incremental reading and gzip support
- GeoIP Support - Geographic distribution of requests (when GeoIP database available)
- System Monitoring - CPU, memory, and disk usage statistics
- Responsive Layout - Adapts to terminal size with intelligent card arrangement
go install github.com/hhftechnology/traefik-log-dashboard/cmd/traefik-log-dashboard@latestgit clone https://github.com/hhftechnology/traefik-log-dashboard.git
cd traefik-log-dashboard/cli
make installDownload pre-built binaries for your platform from the releases page.
traefik-log-dashboard --demotraefik-log-dashboard --file /var/log/traefik/access.logtraefik-log-dashboard --url http://localhost:8080traefik-log-dashboard [OPTIONS]
Options:
--file PATH Path to Traefik access log file
--url URL URL of Traefik Log Dashboard Agent (default: http://localhost:8080)
--demo Run with demo data
--period DURATION Time period to analyze (default: 1h)
Examples: 5m, 1h, 24h, 7d
--refresh DURATION Dashboard refresh interval (default: 5s)
--help Show help message
--version Show version informationThe CLI dashboard includes the following cards:
- Total requests in the selected period
- Requests per second
- Trends and sparklines
- Average response time
- P95 and P99 percentiles
- Response time distribution
- 2xx, 3xx, 4xx, 5xx breakdown
- Visual pie chart representation
- Percentage distribution
- Most requested routes
- Request counts and percentages
- Average response times
- Service performance metrics
- Request counts and error rates
- Average response times
- Router performance metrics
- Traffic distribution
- Error rates
- Latest error entries (4xx, 5xx)
- Timestamp, status code, and request details
- Router and service information
- Visual sparkline of request activity
- Time-based request distribution
- Peak and average rates
- CPU usage
- Memory usage
- Disk usage
- Health recommendations
- Request origins by country (requires GeoIP database)
- Top countries by request count
qorCtrl+C- Quit the applicationr- Refresh data↑/↓orj/k- Scroll through logs (when in detail view)h- Show help1-9- Switch between different time periods
# Agent URL
export TRAEFIK_AGENT_URL=http://localhost:8080
# Log file path
export TRAEFIK_LOG_FILE=/var/log/traefik/access.log
# GeoIP database path
export GEOIP_DB=/usr/share/GeoIP/GeoLite2-City.mmdb
# Refresh interval
export REFRESH_INTERVAL=5sThe CLI supports both JSON and Common Log Format (CLF) Traefik logs:
JSON Format (recommended):
{
"ClientAddr": "192.168.1.100:54321",
"RequestMethod": "GET",
"RequestPath": "/api/users",
"DownstreamStatus": 200,
"Duration": 1234567,
"RouterName": "api-router",
"ServiceName": "api-service"
}Common Log Format:
192.168.1.100 - - [10/Oct/2025:13:55:36 +0000] "GET /api/users HTTP/1.1" 200 1234
For the best experience, connect the CLI to the Traefik Log Dashboard Agent:
- Start the agent:
cd agent
make run- Connect the CLI:
traefik-log-dashboard --url http://localhost:8080The agent provides additional features:
- System resource monitoring
- Real-time log streaming
- GeoIP lookups
- Compressed log support
# Clone the repository
git clone https://github.com/hhftechnology/traefik-log-dashboard.git
cd traefik-log-dashboard/cli
# Install dependencies
make deps
# Build
make build
# Run tests
make test
# Run with demo data
make runcli/
├── cmd/
│ └── traefik-log-dashboard/
│ └── main.go # Entry point
├── internal/
│ ├── config/ # Configuration
│ ├── env/ # Environment variables
│ ├── logs/ # Log parsing and metrics
│ │ ├── logs.go
│ │ ├── metrics.go
│ │ ├── demo.go
│ │ ├── traefik/ # Traefik-specific parsers
│ │ └── period/ # Time period handling
│ ├── model/ # Bubble Tea model
│ │ ├── model.go
│ │ ├── service.go
│ │ ├── update.go
│ │ └── view.go
│ └── ui/ # UI components
│ ├── styles/ # Lipgloss styles
│ └── dashboard/ # Dashboard components
│ ├── dashboard.go
│ ├── grid.go
│ └── cards/ # Individual cards
│ ├── requests.go
│ ├── response_time.go
│ ├── status_codes.go
│ ├── top_routes.go
│ ├── backends.go
│ ├── routers.go
│ ├── errors.go
│ ├── timeline.go
│ └── system.go
├── go.mod
├── go.sum
├── Makefile
└── README.md
- Go 1.22 or later
- Terminal with 256 color support
- Minimum terminal size: 80x24
The CLI is optimized for performance:
- Log Parsing: ~100,000 lines/second
- Memory Usage: ~50MB for 1M log entries
- Update Latency: <10ms UI refresh
- CPU Usage: <5% during normal operation
- Check that the log file path is correct
- Ensure the agent is running (if using agent mode)
- Verify log file permissions
- Check that logs are being written to the file
- Ensure your terminal supports 256 colors
- Set
TERM=xterm-256colorif needed - Try a different terminal emulator
- Increase the refresh interval:
--refresh 10s - Reduce the time period:
--period 15m - Check for very large log files (>1GB)
Contributions are welcome! Please read our Contributing Guide for details.
MIT License - see LICENSE for details
Built with:
- Bubble Tea - TUI framework
- Bubbles - TUI components
- Lipgloss - Style definitions
- gopsutil - System monitoring
- Traefik Log Dashboard Agent - Backend API service
- Traefik Log Dashboard - Web-based dashboard
- Traefik - Cloud Native Application Proxy
Made with ❤️ for the Traefik community