Skip to content

feat(grafana): rebuild Grafana dashboards for multi-protocol dual-stack tracker#8

Merged
josecelano merged 4 commits intomainfrom
feat/rebuild-grafana-dashboards
Mar 11, 2026
Merged

feat(grafana): rebuild Grafana dashboards for multi-protocol dual-stack tracker#8
josecelano merged 4 commits intomainfrom
feat/rebuild-grafana-dashboards

Conversation

@josecelano
Copy link
Copy Markdown
Member

@josecelano josecelano commented Mar 11, 2026

Closes #6

Why the existing dashboards need replacing

The current provisioned dashboards (metrics.json, stats.json) were
built for the old Torrust Index + Tracker demo, which ran a single UDP
tracker with IPv4 only
. They filter by
server_binding_address_ip_family="inet", which never matches in the new
setup because all sockets are dual-stack ([::]) and the metric always
reports inet6 — so most panels show no data.

The new demo runs four service instances across two protocols:

Service Port
UDP Tracker 1 6969
UDP Tracker 2 6868
HTTP Tracker 1 7070
HTTP Tracker 2 7071

The correct filter going forward is server_binding_port to distinguish
instances, not server_binding_address_ip_family.

The new dashboards are manually imported into Grafana (not provisioned
via config files), so they live in Grafana's own database and are backed
up here in backups/grafana/dashboards/ for recovery and sharing.

Changes

AGENTS.md

Documented the three top-level folders so the purpose of each is
unambiguous:

  • server/ — only files actually deployed on the server
  • docs/ — documentation only
  • backups/ — versioned backup exports of app-managed data (e.g. Grafana
    dashboards exported from the UI)

backups/grafana/dashboards/

New folder for Grafana dashboard backups (JSON + screenshot pairs).

server/ — old provisioned dashboards removed

Deleted metrics.json and stats.json from
server/opt/torrust/storage/grafana/provisioning/dashboards/torrust/.
These will be removed from the server and Grafana restarted so the broken
provisioned dashboards no longer appear.

Progress

  • 01-tracker-overview.jsonverified on live Grafana
    • Completed downloads, Torrents, Seeders, Leechers (stat panels)
    • UDP Announces per sec (aggregate, all ports)
    • HTTP Announces per sec (aggregate, all ports)
  • 02-udp-tracker-1.jsonverified on live Grafana (UDP Tracker 1, port 6969)
    • Connections, Announces, Scrapes, Errors (per sec)
    • Avg Connect/Announce/Scrape Time, Banned Requests (per sec)
    • Requests & Responses (per sec), Banned IPs, Aborted Requests (per sec)
  • 03-http-tracker-1.jsonverified on live Grafana (HTTP Tracker 1, port 7070)
    • Announces per sec
    • Scrapes per sec
    • Note: HTTP metrics are sparse; only http_tracker_core_requests_received_total is currently exposed
  • Remove old provisioned metrics.json and stats.json from server/

Still to do

  • Deploy: delete the files from the server and restart Grafana
  • Optionally remove the tracker_stats Prometheus scrape job

Refs: #6

The existing provisioned dashboards (metrics.json, stats.json) were
designed for the old Torrust Index + Tracker demo with a single UDP
tracker and IPv4 only. They are being replaced with new dashboards
that reflect the current multi-protocol, dual-stack setup.

This commit adds:
- AGENTS.md: documents the repository structure including the new
  backups/ folder purpose and clarifies that server/ is only for
  files actually deployed on the server.
- backups/grafana/dashboards/01-tracker-overview.json: first new
  dashboard, manually imported into Grafana (not provisioned).
  Shows global aggregate metrics: completed downloads, torrents,
  seeders, leechers, UDP announces (per sec), HTTP announces (per sec).
- backups/grafana/dashboards/01-tracker-overview.png: screenshot of
  the verified dashboard.

All queries use server_binding_port instead of
server_binding_address_ip_family (which is always inet6 in the
dual-stack setup) to avoid empty panels.

Refs: #6
@josecelano josecelano requested a review from da2ce7 March 11, 2026 11:56
@josecelano josecelano self-assigned this Mar 11, 2026
@josecelano josecelano marked this pull request as ready for review March 11, 2026 12:55
@josecelano
Copy link
Copy Markdown
Member Author

ACK cb2188c

@josecelano josecelano merged commit dd4e9bb into main Mar 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: rebuild Grafana dashboards for new multi-protocol dual-stack tracker

1 participant