All MIBs › NET-SNMP-EXAMPLES-MIB › netSnmpExampleString
netSnmpExampleString
Module: NET-SNMP-EXAMPLES-MIB
OID (symbolic): NET-SNMP-EXAMPLES-MIB::netSnmpExampleString
OID (numeric): 1.3.6.1.4.1.8072.2.1.3
Node type: OBJECT-TYPE
Type: Integer32
Access: read-write
Description: This is a simple object which merely houses a writable string. It's only purposes is to hold the value of a single string. Writing to it will simply change the value for subsequent GET/GETNEXT/GETBULK retrievals.
This example object is implemented in the agent/mibgroup/examples/watched.c file.
What is netSnmpExampleString?
Despite its name suggesting a string, this object's SYNTAX is actually Integer32 and it is a simple writable value whose sole purpose is to hold a single value for demonstration purposes. Writing to it via SNMP SET changes the value returned by subsequent GET, GETNEXT, or GETBULK requests, useful for exercising basic scalar read/write handling in test tooling. For example, a developer might SET this object and then immediately GET it to confirm the Net-SNMP agent's watched-object example code path works correctly.
Examples
Walk all instances (SNMPv2c):
snmpwalk -v2c -c public <target> 1.3.6.1.4.1.8072.2.1.3 snmpwalk -v2c -c public <target> NET-SNMP-EXAMPLES-MIB::netSnmpExampleString
Get a specific instance (index 1):
snmpget -v2c -c public <target> 1.3.6.1.4.1.8072.2.1.3.1 snmpget -v2c -c public <target> NET-SNMP-EXAMPLES-MIB::netSnmpExampleString.1
Set instance 1 (SNMPv2c):
snmpset -v2c -c private <target> 1.3.6.1.4.1.8072.2.1.3.1 i <value>
Start monitoring Linux/Unix host running Net-SNMP agent (demonstration module, not real hardware) with a free 30-day trial of IPNetwork Monitor. Create custom SNMP monitor using the NET-SNMP-EXAMPLES-MIB::netSnmpExampleString OID value, configure state conditions and alerts, and monitor any Linux/Unix host running Net-SNMP agent (demonstration module, not real hardware) from a single console.
OID Breakdown
Upper-level ancestors (7 from the standard OID tree / other modules)
| Numeric OID | Name | Module |
|---|---|---|
| 1 | iso | LANART-AGENT |
| 1.3 | org | AirPair-MIB |
| 1.3.6 | dod | AirPair-MIB |
| 1.3.6.1 | internet | AirPair-MIB |
| 1.3.6.1.4 | private | AirPair-MIB |
| 1.3.6.1.4.1 | enterprises | AirPair-MIB |
| 1.3.6.1.4.1.8072 | netSnmp | NET-SNMP-MIB |
| Numeric OID | Name | Module |
|---|---|---|
| 1.3.6.1.4.1.8072.2 | netSnmpExamples | NET-SNMP-EXAMPLES-MIB |
| 1.3.6.1.4.1.8072.2.1 | netSnmpExampleScalars | NET-SNMP-EXAMPLES-MIB |
| 1.3.6.1.4.1.8072.2.1.3 | netSnmpExampleString | NET-SNMP-EXAMPLES-MIB |