You are having trouble collecting SNMP metrics from your device or you need to see what specific Object Identifiers (OIDs) your device supports.
The snmpwalk utility is a useful tool for troubleshooting various SNMP challenges you may encounter. Because
ktranslate runs on the host network of the Linux host that Docker is running on top of, it is an accurate measurement of whether or not your devices are responding to SNMP requests and what specifically they are responding with.
Most systems will have
snmpwalk installed, but if necessary, you can load it yourself by running
apt-get install snmp or
yum install net-snmp-utils.
You can test connectivity to your SNMP devices with a basic test to gather the System Object Identifier (SysOID) of the device. If it's successful, the configuration of SNMP on the device and the network connectivity between the Docker host and the device are working well. If it fails, you'll need to validate the settings in your internal network.
Run one of the following depending on your SNMP device version:
The following is an example of the expected output after running
$.188.8.131.52.184.108.40.206.0 = OID: .220.127.116.11.18.104.22.168.46
You may want to capture the output of walking every OID available on your devices. This output is used when creating new SNMP profiles for
ktranslate, and it's a requirement to open a profile request on GitHub.
The primary differences in your command for this are changing the target to a root
., and redirecting the output to a file that you can gather data from later.
SNMP v2 example
$snmpwalk -v 2c -On -c $COMMUNITY $IP_ADDRESS . >> snmpwalk.out
SNMP v3 example
$snmpwalk -v 3 -l $LEVEL -u $USERNAME -a $AUTH_PROTOCOL -A $AUTH_PASSPHRASE -x $PRIV_PROTOCOL -X $PRIV_PASSPHRASE -ObentU -Cc $IP_ADDRESS . >> snmpwalk.out
The output of this command will be a file named
snmpwalk.out, that lists every OID that the device responds to.
On devices with a large number of interfaces, this SNMP walk can take more than 10 minutes to complete.