snmpGet utility usage
search cancel

snmpGet utility usage

book

Article ID: 303543

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

  • Usage of snmpGet tool installed by Smarts Network Configuration Manager (Smarts NCM).
  • Obtaining SNMPObjectID values from a device in Smarts NCM.

Environment

NCM - 10.1.x

Resolution

Ensure that SNMP is enabled on the target device because NCM uses snmpGet tool to successfully retrieve data.

  • On a Smarts NCM Application Server (AS), Combination Server (CS), or Device Server (DS), log in to a Linux shell as 'root' user.
  • Set the VOYENCE_HOME environment variable by running source /etc/voyence.conf
  • Use the Smarts NCM snmpGet tool to query a device for an SNMP ObjectID (OID) value by running the following command:
$VOYENCE_HOME/tools/snmpGet $DEVICE_IP $DEVICE_OID -$SNMP_VERSION -C$COMMUNITY_STRING

Where:

  • DEVICE_IP = the management IP address of the device
  • DEVICE_OID = the OID you intend to perform SNMP walk (ex. 1.3.6.1.2.1.1.2.0 for a sysObjectID/SysOID)
  • SNMP_VERSION = V1, V2 or V3
  • COMMUNITY_STRING = the SNMP community string configured in the device

Example 1:

The following commands get the SysObjectID value of a device, then write the results to a file named sysObjectID.txt in the current directory:

  • source /etc/voyence.conf
  • $VOYENCE_HOME/tools/snmpGet $DEVICE_IP 1.3.6.1.2.1.1.2.0 -V2 -C$COMMUNITY_STRING > sysObjectID.txt

Where:

  • DEVICE_IP = Device management IP address
  • COMMUNITY_STRING = Valid read-only or read-write SNMP community string

Output of sysObjectID.txt looks similar to below:

SNMP++ Get to <DeviceIP> SNMPV1 Retries=1 Timeout=1000ms Community=<Device Community String>
Oid = 1.3.6.1.2.1.1.2.0
Value = 1.3.6.1.4.1.9.5.17

Example 2:

The following commands get the SysDescr value of a device, then write the results to a file named sysDescr.txt in the current directory:

  • source /etc/voyence.conf
  • $VOYENCE_HOME/tools/snmpGet $DEVICE_IP 1.3.6.1.2.1.1.1.0 -V2 -C$COMMUNITY_STRING > sysDescr.txt

Where:

  • DEVICE_IP = Device management IP address
  • COMMUNITY_STRING = Valid read-only or read-write SNMP community string

Output of sysDescr.txt looks similar to below:

SNMP++ Get to <DeviceIP> SNMPV1 Retries=1 Timeout=1000ms Community=<Device Community String>
Oid = 1.3.6.1.2.1.1.1.0
Value = Cisco Systems WS-C5500
Cisco Catalyst Operating System Software, Version 6.4(1)
Copyright (c) 1995-2003 by Cisco Systems

Additional Information