All MIBs › NET-SNMP-EXAMPLES-MIB › netSnmpExampleInteger
netSnmpExampleInteger
Module: NET-SNMP-EXAMPLES-MIB
OID (symbolic): NET-SNMP-EXAMPLES-MIB::netSnmpExampleInteger
OID (numeric): 1.3.6.1.4.1.8072.2.1.1
Node type: OBJECT-TYPE
Type: Integer32
Access: read-write
Description: This is a simple object which merely houses a writable integer. It's only purposes is to hold the value of a single integer. Writing to it will simply change the value for subsequent GET/GETNEXT/GETBULK retrievals.
This example object is implemented in the agent/mibgroup/examples/scalar_int.c file.
What is netSnmpExampleInteger?
This is a simple writable integer object whose sole purpose is to hold a single integer value for demonstration, defaulting to 42. Writing to it via SNMP SET simply changes the value returned by subsequent GET, GETNEXT, or GETBULK requests, making it useful for testing basic scalar read/write support in an SNMP client or agent. For example, a developer testing SNMP tooling might SET this to 100 and then GET it back to confirm the round trip works.
Examples
Walk all instances (SNMPv2c):
snmpwalk -v2c -c public <target> 1.3.6.1.4.1.8072.2.1.1 snmpwalk -v2c -c public <target> NET-SNMP-EXAMPLES-MIB::netSnmpExampleInteger
Get a specific instance (index 1):
snmpget -v2c -c public <target> 1.3.6.1.4.1.8072.2.1.1.1 snmpget -v2c -c public <target> NET-SNMP-EXAMPLES-MIB::netSnmpExampleInteger.1
Set instance 1 (SNMPv2c):
snmpset -v2c -c private <target> 1.3.6.1.4.1.8072.2.1.1.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::netSnmpExampleInteger 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.1 | netSnmpExampleInteger | NET-SNMP-EXAMPLES-MIB |