Skip to content

Grafana Dashboard

A pre-built Grafana dashboard is included for monitoring the bouncer and router health.

Dark theme:

Grafana dashboard dark theme

Light theme:

Grafana dashboard light theme

Before importing the dashboard, you need:

  1. A running Grafana instance (v9.0+ recommended)
  2. A running Prometheus instance scraping the bouncer
  3. The bouncer running with metrics.enabled: true

Enable Prometheus metrics in your bouncer configuration:

config.yaml
metrics:
enabled: true
listen_addr: "0.0.0.0"
listen_port: 2112
routeros_poll_interval: 30s # Enables RouterOS system metrics

Verify the metrics endpoint is working:

Terminal window
curl -s http://<bouncer-host>:2112/metrics | head -20

2. Configure Prometheus to Scrape the Bouncer

Section titled “2. Configure Prometheus to Scrape the Bouncer”

Add a scrape job to your Prometheus configuration:

prometheus.yml
scrape_configs:
- job_name: "cs-routeros-bouncer"
static_configs:
- targets: ["<bouncer-host>:2112"]
scrape_interval: 15s

Replace <bouncer-host> with the IP or hostname where the bouncer is running.

After adding the scrape config, reload Prometheus:

Terminal window
# Reload via HTTP (if --web.enable-lifecycle is set)
curl -X POST http://localhost:9090/-/reload
# Or restart Prometheus
systemctl restart prometheus

Verify the target is healthy in Prometheus UI: Status → Targets — the cs-routeros-bouncer target should show UP.

  1. Open Data Sources

    In Grafana, navigate to ConnectionsData sourcesAdd data source.

  2. Select Prometheus

    Choose Prometheus from the list.

  3. Configure the connection

    Set the Prometheus server URL to your Prometheus instance (e.g., http://localhost:9090 or http://prometheus:9090 for Docker).

  4. Save & Test

    Click Save & Test — you should see “Successfully queried the Prometheus API.”

  1. Open Grafana import

    Navigate to DashboardsNewImport.

  2. Upload the dashboard JSON

    Upload grafana/dashboard.json from the repository.

  3. Select Prometheus data source

    Choose the Prometheus data source you configured in step 3.

  4. Click Import

    The dashboard will be created and immediately display data.

The dashboard contains 41 panels organized into 9 rows:

RowPanels
OverviewRouterOS Connected, Active Decisions (IPv4/IPv6/Total), IPv4/IPv6 Ratio, Uptime, Bouncer Info
RouterOS SystemRouterOS System, CPU Load Over Time, Memory Usage Over Time, CPU Temperature Over Time, RouterOS Uptime, RouterOS Info
DecisionsActive Decisions Over Time, Cumulative Decisions, Decisions Processed (Rate)
Decisions by OriginActive Decisions by Origin, Decisions by Origin (Rate), Cumulative Decisions by Origin
Firewall TrafficProcessed Bytes, Processed Packets, Dropped Bytes, Dropped Packets, Drop Rate, Processed/Dropped Traffic Rate, Processed/Dropped Traffic by Protocol (Rate), Processed Traffic (Cumulative), Drop Rate Over Time
Errors & ReconciliationError Rate, RouterOS Connection, Reconciliation Duration, Last Reconciliation, Total Errors
Performance & OperationsOperation Latency (p50/p95/p99), Operation Rate
Process ResourcesMemory Usage, CPU Usage, Goroutines & File Descriptors
ConfigurationBouncer Configuration