router_prometheus
router_prometheus copied to clipboard
Get metrics from various consumer routers
router_prometheus

Features
- [X] YML configuration file for defining global options and routers
- [X] Mapping MAC addresses to user-friendly device names
- [X] Different backends for different systems and brands so that the project is easily extendable
- [ ] Using public key authentication in SSH
- [X] Expose a Prometheus endpoint so metrics can be scraped by Prometheus scrapers
- [X] Docker container
Other project goals are tracked with in issues
Collected metrics
| Metric | Description | Required feature |
|---|---|---|
router_ap_client_signal |
Current signal strength (in dBm) for each connected client device | signal |
router_ap_channel |
Current channel of each interface | channel |
router_net_sent, router_net_recv |
Total number of bytes received/transmitted on a wireless interface, read from /sys/class/net/INTERFACE/statistics/rx_bytes |
rxtx |
router_system_load |
Average load (over the last 1, 5 and 15 minutes), read from /proc/loadavg |
proc |
router_mem_percent_used |
Used memory in %, calculated from /proc/meminfo |
proc |
router_thermal |
Temperature info from the router's temperature probes | thermal |
Available backends
| Backend | Description | Available features |
|---|---|---|
dd-wrt |
Should support all routers running DD-WRT | signal, channel, rxtx, proc, thermal |
openwrt |
Should support all routers running OpenWRT | signal, channel, rxtx, proc |
ubnt |
Should work on most Ubiquiti bridge devices | signal, channel, rxtx, proc |
dsl-ac55u |
Only supports the Asus DSL-AC55U | signal, channel, rxtx, proc |
Known issues
Feel free to open a new issue here, be it a bug report, feature request or just a question.
- When a command gets stuck, it hangs the whole progam indefinitely (caused by this issue)
- Same goes for losing connection
Example config files
config.yml:
port: 9000
address: 127.0.0.1
debug: true
cpython_metrics: false
routers.yml:
DSL-AC55U:
address: 10.0.0.1
backend: dsl-ac55U
transport:
username: admin
password: admin
RT-N18U:
address: 10.0.0.2
backend: dd-wrt
transport:
username: root
password: admin
Loco-M5:
address: 10.0.0.3
backend: ubnt
transport:
username: ubnt
use_keys: True
mapping.yml:
00:00:00:00:00:00: "Phone"
11:11:11:11:11:11: "Laptop"