Ubiquiti
Ubiquiti is a genuine case where "how do I configure SNMP" has two completely different answers depending on which product line you're on - there's no unified Ubiquiti SNMP configuration method.
EdgeRouter (EdgeOS) - real CLI, standalone device
EdgeRouters run EdgeOS, which has an actual configuration CLI (VyOS-derived) and are configured standalone, without a separate controller:
configure
set service snmp community public authorization ro
set service snmp location "Rack 4, DC1"
set service snmp contact admin@example.com
set service snmp trap-target 192.168.1.100
commit
save
To restrict a community to specific clients rather than accepting queries from anywhere:
set service snmp community public client 10.0.0.0/24
UniFi devices (switches, APs, gateways) - controller GUI only
UniFi-managed devices (switches, access points, UniFi gateways) have no standalone SNMP CLI to configure directly - SNMP is enabled and configured entirely through the UniFi Controller/UniFi OS Console, then pushed out to devices during provisioning:
- In the UniFi Network application, go to Settings (the exact path has moved between UniFi OS versions - look under Advanced Features > Advanced Gateway Settings > SNMP, or on newer versions CyberSecure > Traffic Logging).
- Enable SNMP v1/v2c (set a community string, default is
public- change it) and/or SNMPv3 (username and password). - Click Apply Changes - the setting is provisioned out to adopted devices, not configured on them individually.
A real UniFi SNMPv3 limitation worth knowing
The UniFi Controller's SNMPv3 support is deliberately simplified rather than fully configurable: the authentication protocol is hardcoded to SHA and the privacy protocol to AES-128 - there's no option to choose MD5 or DES the way there is on EdgeOS or most other vendors here. The controller also only exposes a single password field, which it uses as both the authentication and privacy password - when configuring a monitoring tool that expects separate auth/priv passwords, use the same value for both.
Model/platform differences worth knowing
- UniFi Dream Machine Pro (UDM-Pro) - Ubiquiti's own documentation states SNMP is not recommended or supported on this specific model, unlike other UniFi gateways.
- USW Flex and USW Ultra switches - do not support SNMP at all, per Ubiquiti's current documentation, unlike the rest of the UniFi switch line.
- UniFi Access Points - have no SNMP agent of their own; AP-level stats are only reachable through the controller, not by polling an AP directly.
Given this split, the first practical question for any Ubiquiti device isn't "what's the SNMP command" but "is this an EdgeRouter or a UniFi-managed device" - the two have nothing in common configuration-wise.