snmpget
Retrieve data from SNMP enabled devices
TLDR
Request a single value from the SNMP agent
Display the full Object Identifier (OID) path
Display help
SYNOPSIS
snmpget [OPTIONS] AGENT OID [OID...]
PARAMETERS
OPTIONS
Various options to configure the SNMP GET request. See the manual page for a full list, including options for specifying SNMP version, community string, security parameters, timeouts, and retries.
AGENT
The hostname or IP address of the device running the SNMP agent.
OID
The Object Identifier (OID) of the information to retrieve. Can also resolve if the MIB is installed.
DESCRIPTION
The `snmpget` command is a command-line tool used to retrieve a specific piece of information from a network device that supports the Simple Network Management Protocol (SNMP). It sends an SNMP GET request to an agent running on the target device, specifying the Object Identifier (OID) of the information being requested. The agent then retrieves the value associated with that OID and sends it back to the `snmpget` command, which displays the result to the user. This command is essential for network administrators to monitor and manage network devices by querying their status, configuration, and performance metrics. SNMP provides a standardized way to access and modify device information, making `snmpget` a valuable tool for troubleshooting and proactively managing network infrastructure. The user must know the correct OID of the data they are retrieving, because the command only gives the value of a specific OID.
CAVEATS
Requires the Net-SNMP suite to be installed. Understanding OIDs is crucial for effective use.
RETURN VALUES
Returns 0 on successful retrieval, 1 if an error occurred. Errors may include timeout, permission issues, or invalid OIDs.
HISTORY
Developed as part of the Net-SNMP project (originally UCD-SNMP) to provide a standardized way to manage and monitor network devices. Its usage has grown with the increasing adoption of SNMP for network management.
SEE ALSO
snmpwalk(1), snmptrap(1), snmpbulkwalk(1)