This repo will be useful to you if you have Ubiquiti Networks UniFi devices and you use Prometheus for your metrics.
The included snmp.yml
is ready to go as is. Simply get the SNMP
exporter, start it and you
should be able to get metrics from your UniFi device.
Test with curl(1):
curl -s 'localhost:9116/snmp?target=X.X.X.X&module=unifi'
Now you can configure Prometheus to scrape this endpoint and you're done.
The included generator.yml
can be updated to scrape any additional
metrics you need.
To use the generator, you'll need to get the Ubiquiti Networks MIBs from here:
https://dl.ubnt-ut.com/snmp/UBNT-MIB and
https://dl.ubnt-ut.com/snmp/UBNT-UniFi-MIB and place them into
$HOME/.snmp/mibs
.
The generator docs should have all you need.
Prometheus SNMP exporter has a great README. Make sure you read it thoroughly, as SNMP and MIBs can be confusing.
The using and loading MIBs section in Net-SNMP documentation is great as well.