• /
  • EnglishEspañol日本語한국어Português
  • Inicia sesiónComenzar ahora

Collecting data for troubleshooting with the 'snmpwalk' utility

Problem

You are having trouble collecting SNMP metrics from your device or you need to see what specific Object Identifiers (OIDs) your device supports.

Solution

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.

Sugerencia

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.

Connectivity testing

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 snmpwalk:

bash
$
.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.9.1.46

Capturing full SNMP walk

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

bash
$
snmpwalk -v 2c -On -c $COMMUNITY $IP_ADDRESS . >> snmpwalk.out

SNMP v3 example

bash
$
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.

Sugerencia

On devices with a large number of interfaces, this SNMP walk can take more than 10 minutes to complete.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.