Asus Router Prometheus Exporter
About
Asus-prometheus-exporter uses a asus router's local endpoints to export the router’s metric data (CPU usage, Memory usage, incoming and outgoing traffic) into Prometheus metric format. Setting up a local instance of Prometheus and Grafana, useful insights are provided into the health of your home network.
Example Grafana Dashboard

Asus-prometheus-exporter allows for passive collection of metrics without touching your routers configuration or using SNMP. Asus-prometheus-exporter utilizes the same endpoints that the routers homepage uses to display the status of the router and network.
Capability
Can export:
- CPU usage on each core
- Memory usage
- Incoming and Outgoing Traffic
- Bridge Traffic
- Internet Traffic
- Wired Traffic
- Wireless Traffic
Requirements
Usage
Raspberry Pi (Raspberry Pi OS)
- Clone the GitHub Repository:
git clone https://github.com/CipherDoc34/asus-prometheus-exporter.git
- Run the
main.go
file in headless mode:
nohup go run asus-prometheus-expoter/main.go -uname=<username default:admin> -passwd=<password>&
- Navigate to localhost:8000/metrics to confirm everything is working
Configuring Prometheus
- Follow Prometheus installation steps: https://prometheus.io/docs/prometheus/latest/installation/
- Edit
prometheus.yml
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# A scrape configuration containing exactly one endpoint to scrape:
scrape_configs:
- job_name: "asus"
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ["localhost:8000"] #Asus-prometheus-exporter endpoint
- Run Prometheus using the prometheus.yml config file:
./prometheus --config.file=prometheus.yml &
- Visit localhost:9090 to confirm that Prometheus is running
Add Grafana Visualization
-
Follow Grafana’s installation steps: https://grafana.com/docs/grafana/latest/setup-grafana/installation/
-
Run Grafana Server.
Linux:
sudo systemctl start grafana-server
- Open localhost:3000. Login to Grafana (default username and password is admin)
- Add a new Prometheus Data Source. Configure with Prometheus server URL http://localhost:9090
- Press Build a Dashboard to start configuring