A modern web dashboard for monitoring AdGuard Home DNS statistics, built with Go and Echo framework.
- π Real-time Statistics: Monitor DNS queries, blocked domains, and client activity
- π₯ Client Management: View connected DNS clients with detailed information
- π Upstream Performance: Track DNS upstream response times and performance
- π¨ Modern UI: Clean, responsive interface with professional styling
- π Self-contained: Single binary with embedded templates and assets
- β‘ Fast & Lightweight: Built with Go for high performance
- Overview dashboard with navigation cards
- Quick access to all monitoring sections
- Connected DNS clients table
- Client IP addresses and hostnames
- WHOIS information (country, organization, city)
- Source detection (rDNS, WHOIS, etc/hosts)
- Top Queried Domains: Most frequently accessed domains
- Top Clients: Clients with highest query volumes
- Top Blocked Domains: Most frequently blocked domains
- Summary Metrics: Total queries, blocked queries, processing time
- Response Count: DNS upstream servers by query volume
- Response Time: DNS upstream servers by average response time
- Go 1.24.3 or later
- AdGuard Home instance
- Basic authentication credentials for AdGuard Home API
-
Clone the repository:
git clone https://github.com/pulsiot/aghamon.git cd aghamon -
Install dependencies:
go mod tidy
-
Build the self-contained binary:
go build -o aghamon
Create a config.yaml file in the same directory as the binary:
# AdGuard Home Configuration
adguard:
# Your AdGuard Home server URL
server_url: "https://your-adguard-server.com"
# AdGuard Home username
username: "your-username"
# AdGuard Home password
password: "your-password"./aghamonThe application will start on http://localhost:8080
PORT: Change the default port (default: 8080)CONFIG_PATH: Path to config file (default: ./config.yaml)
- AdGuard Home admin interface access
- Basic authentication enabled
- API endpoints accessible from the monitoring server
- Backend: Go 1.24.3 with Echo web framework
- Templates: HTML with embedded Go templates
- Styling: Pure CSS with Flexbox layout
- Assets: Embedded file system for self-contained deployment
- Embedded File System: Templates and assets compiled into binary
- REST API Client: AdGuard Home API integration
- Template Engine: Dynamic HTML generation
- Static File Server: Secure asset serving
aghamon/
βββ main.go # Main application entry point
βββ config.yaml # Configuration file (external)
βββ go.mod # Go module dependencies
βββ README.md # This file
βββ assets/ # Static assets (embedded in binary)
β βββ logo_small.png # Application logo
βββ templates/ # HTML templates (embedded in binary)
βββ base.html # Base template with header/footer
- Secure Static File Serving: Assets served only from dedicated directory
- Path Traversal Protection: Prevents directory traversal attacks
- Embedded Resources: Templates and assets compiled into binary
- Configuration Isolation: Sensitive config stored externally
GET /- Home dashboardGET /clients- DNS clients tableGET /stats- DNS statisticsGET /upstreams- DNS upstream performance
GET /control/clients- Fetch client informationGET /control/stats- Fetch DNS statistics
- Build the binary:
go build -o aghamon - Create configuration file:
config.yaml - Run:
./aghamon
FROM golang:1.24-alpine AS builder
WORKDIR /app
COPY . .
RUN go build -o aghamon
FROM alpine:latest
WORKDIR /root/
COPY --from=builder /app/aghamon .
COPY config.yaml .
EXPOSE 8080
CMD ["./aghamon"]The application provides built-in logging:
- Server startup and shutdown events
- API request errors
- Configuration loading status
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Commit changes:
git commit -am 'Add new feature' - Push to the branch:
git push origin feature/new-feature - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Echo Framework - High performance Go web framework
- AdGuard Home - Network-wide ads & trackers blocking DNS server
- Go Embed Package - For self-contained binary deployment
For issues and questions:
- Check the AdGuard Home API documentation
- Review the configuration examples
- Create an issue in the GitHub repository
Contact Us:
Made with β€οΈ using Go
