RetroDash // TRAFFIC

GUIDETraffic volume: requests, bandwidth and connections

Theme

Requirements

For traffic metrics you need:

Compatibility Notes

Rate interval

Same as the Latency dashboard: the $rate_interval variable defaults to 5m. For homelabs with sparse traffic, set it to 15m or 30m so request rate panels show smooth data instead of empty windows.

Ingress controller metric mapping

The dashboard uses generic metric names. Map them to your actual ingress controller below:

Generic Metric Traefik Nginx Ingress Istio
http_requests_total traefik_entrypoint_requests_total nginx_ingress_controller_requests istio_requests_total
status label code status response_code
http_request_duration_seconds_* traefik_service_request_duration_seconds_* nginx_ingress_controller_request_duration_seconds_* istio_request_duration_milliseconds_*

Panel Layout

┌────────────────────────────────────────┐
│    TRAFFIC — REQUESTS & BANDWIDTH      │
├────────────────────────────────────────┤
│  Requests/s  │  Connections  │ Network │
│  (stat)      │  (gauge)      │ Status  │
├────────────────────────────────────────┤
│  Request Rate — Time Series [12 cols] │
│  (evolution of requests per second)    │
├────────────────────────────────────────┤
│  Throughput (In/Out) [6 cols]         │
│  Network by Node [6 cols]             │
├────────────────────────────────────────┤
│  Top Talkers [12 cols]                │
│  (hosts with most traffic)             │
└────────────────────────────────────────┘

Panel Customization

Requests/sec Stat

Current number of requests per second.

sum(rate(http_requests_total[5m]))

If you use Nginx:

rate(nginx_http_requests_total[5m])

If you use Traefik:

rate(traefik_entrypoint_requests_total[5m])

If you use API Gateway (Kong, etc):

rate(kong_requests_total[5m])

Connections Gauge

Number of active connections.

sum(node_tcp_connection_states{state="established"})

For Kubernetes:

sum(container_network_tcp_usage_total) / 1000

Filter by specific interface:

sum(node_network_transmit_bytes_total{device="eth0"})

Request Rate — Time Series

Evolution of requests per second over time.

Multi-series query (by HTTP method):

sum by (method) (rate(http_requests_total[5m]))

By status code:

sum by (status) (rate(http_requests_total[5m]))

By service/instance:

sum by (job) (rate(http_requests_total[5m]))

Change granularity: Edit [5m][1m] (more responsive) or [15m] (more smoothed)

Throughput — Network In/Out

Incoming and outgoing bandwidth in bytes.

Network In (received):

sum(rate(node_network_receive_bytes_total[5m])) / 1024 / 1024

Network Out (sent):

sum(rate(node_network_transmit_bytes_total[5m])) / 1024 / 1024

Note: Dividing by 1024/1024 converts bytes to MB. For Gbps, use /1000/1000/125

Exclude virtual interfaces (docker0, veth*):

sum(rate(node_network_receive_bytes_total{device!~"docker.*|veth.*"}[5m]))

Network by Node

Table with traffic for each node.

Query with breakdown by instance:

sum by (instance) (rate(node_network_receive_bytes_total[5m]))

Change grouping:

Filter specific nodes:

sum by (instance) (rate(node_network_receive_bytes_total{instance=~"prod.*"}[5m]))

Top Talkers

Hosts/ips with highest traffic volume.

topk(10, sum by (remote_addr) (rate(http_requests_total[5m])))

For Docker/Kubernetes (container_network_*):

topk(10, sum by (pod_name) (rate(container_network_transmit_bytes_total[5m])))

By domain (if you have a label):

topk(10, sum by (domain) (rate(http_requests_total[5m])))

Change top N: Replace topk(10 with topk(20 or topk(5

Filter by IP range:

topk(10, sum by (remote_addr) (rate(http_requests_total{remote_addr=~"192\\.168\\..*"}[5m])))

Change Color Theme

Theme UP Color DOWN Color
GREEN #33FF00 (healthy) #FF4444 (congested)
AMBER #FFB000 (warning) #FF6C00 (critical)
BLUE #00BFFF (flowing) #FF1493 (blocked)

Adapt to Your Resolution

Device Optimal Width Panel Height
Mobile 6 cols (stack) 8-10 rows
iPad 10.9" 12 cols (full) 10-12 rows
iPad Pro 12.9" 12 cols (full) 12-14 rows
Desktop 1920x1080 24 cols (2x) 8-9 rows

Import in Grafana

  1. Go to Dashboards → Import
  2. Copy the TRAFFIC dashboard JSON
  3. Verify Prometheus datasource is selected
  4. Import and save
  5. Check that all metrics are available in your Prometheus
  6. If a metric is missing, edit the query based on your exporter

Advanced Tips

Detect traffic spikes

rate(http_requests_total[5m]) >
  avg_over_time(rate(http_requests_total[5m])[1h:5m]) * 1.5

Alert if rate exceeds 150% of the last hour average.

Request/byte ratio (efficiency)

sum(rate(http_requests_total[5m])) /
  (sum(rate(node_network_transmit_bytes_total[5m])) / 1024)

Shows how many requests per KB of data transmitted (higher = more efficient).

Bandwidth saturation prediction

predict_linear(node_network_transmit_bytes_total[1h], 3600)

Predicts the value in 1 hour, useful for detecting uncontrolled growth.