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/cs-routeros-bouncer.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 is organized into the following sections:

SectionPanels
OverviewRouterOS Connected, Active Decisions (IPv4/IPv6/Total), Uptime, Bouncer Info
Active DecisionsActive Decisions Over Time, IPv4/IPv6 Ratio
Decision ProcessingDecisions Processed (Rate), Cumulative Decisions
Performance & OperationsOperation Latency (p50/p95/p99), Operation Rate
Errors & ReconciliationError Rate, Total Errors, RouterOS Connection, Last Reconciliation, Reconciliation Duration
Dropped TrafficDropped Bytes, Dropped Packets, Dropped Traffic Rate, Dropped Traffic (Cumulative)
Processed TrafficProcessed Traffic Rate (Bytes/s, Packets/s), Drop Rate %
Decisions by OriginActive Decisions by Origin, Decisions by Origin (Rate), Cumulative by Origin
RouterOSRouterOS Info, RouterOS Uptime, Router CPU, Router Memory, Router Temperature
ConfigurationCurrent bouncer configuration parameters
Process ResourcesMemory Usage, CPU Usage, Goroutines & File Descriptors