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 |
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.yaml
with 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-exporter
Create 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
port_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
- 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.