Prometheus Exporter for low-cost network switches without SNMP support
This Prometheus exporter retrieves port statistics from switches that lack SNMP functionality, enabling monitoring through a web-based interface.
Many budget-friendly network switches do not support standard SNMP monitoring. This exporter provides a workaround by scraping port statistics directly from the switch's web interface.
| Manufacturer | Model | Status | Contributor |
|---|---|---|---|
| Ampcom | WAMJHJ-8125MNG | ✅ Verified | @askainet |
| Horaco | ZX-SWTGW215AS | ✅ Verified | @askainet |
| Horaco | ZX-SWTGW218AS | ✅ Verified | @pvelati |
| Horaco | HC-SWTGW218AS | ✅ Verified | @arthurbarton |
| Horaco | HC-SWTGW124AS | ✅ Verified | @arthurbarton |
| KeepLink | KP-9000-9XHPML-X | ✅ Verified | @jfallot and @adamchabin |
| Sodola | SL-SWTG124AS | ✅ Verified | @dennyreiter |
- Go 1.23+
- Docker (optional)
- Clone the repository
- Download dependencies
go mod download- Copy configuration template
cp config.yaml.example config.yaml- Edit
config.yamlwith your switch details and parameters - Run the exporter
go run main.go# Build Docker image
docker build -t cheap-switch-exporter .
# Run container
docker run -v "./config.yaml:/config.yaml" -p 8080:8080 cheap-switch-exporterCreate a config.yaml with the following structure:
address: "192.168.1.1" # IP or hostname of the switch
username: "admin" # Web interface username
password: "password" # Web interface password
poll_rate_seconds: 10 # Metrics polling interval
timeout_seconds: 5 # Request timeout
poe: 0 # Enable PoE page scrapeport_state: Port enabled/disabled statusport_link_status: Port link up/down statusport_tx_good_pkt: Transmitted good packetsport_tx_bad_pkt: Transmitted bad packetsport_rx_good_pkt: Received good packetsport_rx_bad_pkt: Received bad packets
poe_port_power_on: PoE port power on/offpoe_port_state: State of the PoE port (1=Enable, 0=Disable)poe_port_type: PoE port type classpoe_port_voltage: PoE port voltage in voltspoe_port_watts: PoE port power consumption in wattspoe_port_current_ma: PoE port current in mApoe_system_consumption_watts: Total PoE consumption in watts
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
- Requires web interface access to the switch
- Polling-based metrics collection
- Authentication via web interface credentials
- No TLS
MIT License, see LICENSE file.
Report issues on the GitHub repository's issue tracker.