A Python-based Prometheus exporter for monitoring Netgear modem metrics. This exporter scrapes data from the modem's web interface and exposes it as Prometheus metrics. Includes a premade Grafana dashboard
This project was inspired by @tylxr59's Netgear-Modem-Prometheus-Exporter (https://github.com/tylerx59/Netgear-Modem-Prometheus-Exporter)
• Netgear CM2000
• Scrapes modem information such as vendor, model, hardware version, serial number, MAC address, firmware version, and IPv4 address.
• Monitors downstream and upstream channel statistics including frequency, power, SNR, and symbol rate.
• Periodically updates metrics and exposes them to Prometheus.
• Python 3.x
• requests
• prometheus_client
• time
• re
-
Clone the repository:
git clone https://github.com/jhgrazier/Netgear-CM2000-Prometheus-Exporter.git -
Change into the cloned directory
cd Netgear-CM2000-Prometheus-Exporter -
Install required Python requirements
pip install prometheus_client requests time re -
Copy the netgear-exporter.py into /usr/bin
cp netgear-exporter.py /usr/bin -
Install the service files into /etc/systemd/system
cp netgear-exporter.service /etc/systemd/system
- Edit the netgear-exporter.py to adjust the password.
-
Add the following job to your Prometheus configuration (adjust localhost to the correct IP if they are not running on the same machine):
scrape_configs: - job_name: 'netgear_modem' static_configs: - targets: ['localhost:8000']
-
Enable and Start the service
[root@grafana system]# systemctl enable netgear-exporter.service Created symlink /etc/systemd/system/multi-user.target.wants/netgear-exporter.service → /etc/systemd/system/netgear-exporter.service. [root@grafana system]# systemctl start netgear-exporter.service -
Validate the service started
[root@grafana system]# systemctl status netgear-exporter.service ● netgear-exporter.service - "Start netgear exporter after network is loaded" Loaded: loaded (/etc/systemd/system/netgear-exporter.service; enabled; preset: disabled) Active: active (running) since Fri 2025-03-21 09:24:19 MDT; 5s ago Main PID: 580599 (python) Tasks: 2 (limit: 23111) Memory: 18.0M CPU: 193ms CGroup: /system.slice/netgear-exporter.service └─580599 python /usr/bin/netgear-exporter.py Mar 21 09:24:19 grafana systemd[1]: Started "Start netgear exporter after network is loaded".
-
Run this curl command from command line on your host where prometheus is installed.
curl http://localhost:8000/metrics | grep modem_ -
You should see something like the following:
modem_downstream_power{channel="2"} 2.9 modem_downstream_power{channel="3"} 2.9 modem_downstream_power{channel="4"} 2.8 modem_downstream_power{channel="5"} 2.9 modem_downstream_power{channel="6"} 2.6 modem_downstream_power{channel="7"} 2.8 modem_downstream_power{channel="8"} 3.0 modem_downstream_power{channel="9"} 2.8 modem_downstream_power{channel="10"} 2.8


