Overview
The demo was deployed using the Torrust Tracker Deployer, which
includes a basic Grafana configuration with two provisioned dashboards (stats.json and
metrics.json). These dashboards were designed for the old Torrust Index + Tracker
demo, which ran a single UDP tracker with IPv4 only.
The tracker exposes metrics via two endpoints:
- Stats (
/api/v1/stats) — the legacy endpoint, still available.
- Metrics (
/api/v1/metrics) — the newer, extensible metrics endpoint.
In the old demo, both dashboards existed solely to verify that the two endpoints
produced the same data. In this demo we only need the Metrics endpoint. The Stats
dashboard and the Stats Prometheus scrape job can be removed.
Current Configuration
Tracker services (from tracker.toml)
| Service |
Bind Address |
Public Endpoint |
| UDP Tracker 1 |
[::]:6969 |
udp://udp1.torrust-tracker-demo.com:6969/announce |
| UDP Tracker 2 |
[::]:6868 |
udp://udp1.torrust-tracker-demo.com:6868/announce |
| HTTP Tracker 1 |
[::]:7070 |
https://http1.torrust-tracker-demo.com |
| HTTP Tracker 2 |
[::]:7071 |
https://http2.torrust-tracker-demo.com |
All services bind to [::], meaning they accept both IPv4 (inet) and IPv6 (inet6)
connections.
Existing dashboards (from deployer)
| File |
Endpoint used |
Covers |
metrics.json |
/api/v1/metrics |
UDP IPv4 only |
stats.json |
/api/v1/stats |
UDP IPv4 only |
Available metric labels
The Metrics endpoint exposes per-service metrics with labels:
server_binding_address_ip_family — inet (IPv4) or inet6 (IPv6)
request_kind — connect, announce, scrape (UDP) or announce, scrape (HTTP)
peer_role — seeder, leecher
Proposed New Dashboard Structure
Replace the two existing provisioned dashboards with three new dashboards
created directly in the Grafana UI. All use the Metrics endpoint only.
Each timeseries panel will use two series (IPv4 and IPv6) on the same graph, rather
than separate side-by-side panels. This halves the number of panels per dashboard while
making it easy to compare IP families at a glance.
1. Tracker Overview
Global aggregate metrics that are shared across all protocols and IP families:
- Completed downloads (stat)
- Torrents (stat)
- Seeders (stat)
- Leechers (stat)
2. UDP Tracker
UDP request/response metrics with IPv4 and IPv6 as separate series on the same graph:
- Connections (per sec) — inet + inet6 series
- Announces (per sec) — inet + inet6 series
- Scrapes (per sec) — inet + inet6 series
- Errors (per sec) — inet + inet6 series
- Avg connect time — inet + inet6 series
- Avg announce time — inet + inet6 series
- Avg scrape time — inet + inet6 series
- Banned requests (per sec) — inet + inet6 series
- Requests & responses (per sec) — inet req + inet resp + inet6 req + inet6 resp
- Banned IPs (timeseries)
- Aborted requests (per sec) — inet + inet6 series
3. HTTP Tracker
HTTP request/response metrics (same approach, no "connect" since that's UDP-only):
- Announces (per sec) — inet + inet6 series
- Scrapes (per sec) — inet + inet6 series
- Errors (per sec) — inet + inet6 series
- Avg announce time — inet + inet6 series
- Avg scrape time — inet + inet6 series
- Banned requests (per sec) — inet + inet6 series
- Requests & responses (per sec) — inet req + inet resp + inet6 req + inet6 resp
- Banned IPs (timeseries)
- Aborted requests (per sec) — inet + inet6 series
Implementation approach
- Create dashboard JSON files locally for import into Grafana UI (not provisioned).
- Import and verify on the live Grafana instance.
- Iterate until dashboards display data correctly.
- Once verified, export final versions from Grafana and store as backups in this repo.
- Remove old provisioned dashboards (
stats.json, metrics.json) from the server
config and restart Grafana to remove them from the panel.
Notes
- The initial JSON files use assumed metric names for the HTTP tracker
(http_tracker_server_*), based on the known UDP naming pattern
(udp_tracker_server_*). These may need adjustment after checking the actual
/api/v1/metrics output.
- Queries currently do not filter by port/bind address, so they aggregate across
all instances of each protocol (UDP1 + UDP2, HTTP1 + HTTP2). Per-instance filtering
can be added once the exact label names are verified from the live metrics.
File Changes
Dashboards to remove from provisioning (on server)
| File |
Reason |
metrics.json |
Replaced by the three new dashboards |
stats.json |
Stats endpoint is no longer needed in this demo |
Prometheus config update
Consider removing the tracker_stats scrape job from prometheus.yml since the Stats
endpoint is no longer needed.
Tasks
Acceptance Criteria
Overview
The demo was deployed using the Torrust Tracker Deployer, which
includes a basic Grafana configuration with two provisioned dashboards (
stats.jsonandmetrics.json). These dashboards were designed for the old Torrust Index + Trackerdemo, which ran a single UDP tracker with IPv4 only.
The tracker exposes metrics via two endpoints:
/api/v1/stats) — the legacy endpoint, still available./api/v1/metrics) — the newer, extensible metrics endpoint.In the old demo, both dashboards existed solely to verify that the two endpoints
produced the same data. In this demo we only need the Metrics endpoint. The Stats
dashboard and the Stats Prometheus scrape job can be removed.
Current Configuration
Tracker services (from
tracker.toml)[::]:6969udp://udp1.torrust-tracker-demo.com:6969/announce[::]:6868udp://udp1.torrust-tracker-demo.com:6868/announce[::]:7070https://http1.torrust-tracker-demo.com[::]:7071https://http2.torrust-tracker-demo.comAll services bind to
[::], meaning they accept both IPv4 (inet) and IPv6 (inet6)connections.
Existing dashboards (from deployer)
metrics.json/api/v1/metricsstats.json/api/v1/statsAvailable metric labels
The Metrics endpoint exposes per-service metrics with labels:
server_binding_address_ip_family—inet(IPv4) orinet6(IPv6)request_kind—connect,announce,scrape(UDP) orannounce,scrape(HTTP)peer_role—seeder,leecherProposed New Dashboard Structure
Replace the two existing provisioned dashboards with three new dashboards
created directly in the Grafana UI. All use the Metrics endpoint only.
Each timeseries panel will use two series (IPv4 and IPv6) on the same graph, rather
than separate side-by-side panels. This halves the number of panels per dashboard while
making it easy to compare IP families at a glance.
1. Tracker Overview
Global aggregate metrics that are shared across all protocols and IP families:
2. UDP Tracker
UDP request/response metrics with IPv4 and IPv6 as separate series on the same graph:
3. HTTP Tracker
HTTP request/response metrics (same approach, no "connect" since that's UDP-only):
Implementation approach
stats.json,metrics.json) from the serverconfig and restart Grafana to remove them from the panel.
Notes
(
http_tracker_server_*), based on the known UDP naming pattern(
udp_tracker_server_*). These may need adjustment after checking the actual/api/v1/metricsoutput.all instances of each protocol (UDP1 + UDP2, HTTP1 + HTTP2). Per-instance filtering
can be added once the exact label names are verified from the live metrics.
File Changes
Dashboards to remove from provisioning (on server)
metrics.jsonstats.jsonPrometheus config update
Consider removing the
tracker_statsscrape job fromprometheus.ymlsince the Statsendpoint is no longer needed.
Tasks
overview.jsondraft dashboard JSON for importudp-tracker.jsondraft dashboard JSON for importhttp-tracker.jsondraft dashboard JSON for import/api/v1/metricsmetrics.jsonandstats.jsonfrom server and restart Grafanatracker_statsscrape job fromprometheus.ymlAcceptance Criteria
stats.jsonandmetrics.jsonprovisioned dashboards are removed/api/v1/metrics) endpoint only