ifName

OBS ✓
IF-MIB · .1.3.6.1.2.1.31.1.1.1.1

Object

The textual name of the interface.  The value of this
object should be the name of the interface as assigned by
the local device and should be suitable for use in commands
entered at the device's `console'.  This might be a text
name, such as `le0' or a simple port number, such as `1',
depending on the interface naming syntax of the device.  If
several entries in the ifTable together represent a single
interface as named by the device, then each will have the
same value of ifName.  Note that for an agent which responds
to SNMP queries concerning an interface on some other
(proxied) device, then the value of ifName for such an
interface is the proxied device's local name for it.
              
If there is no local name, or this object is otherwise not
applicable, then this object contains a zero-length string.
Observium directly uses this object
This object is referenced by an Observium discovery or polling workflow.
Used in: Ports Sensors
Explore Observium network monitoring

Context

MIB
IF-MIB
OID
.1.3.6.1.2.1.31.1.1.1.1
Type
column
Access
readonly
Status
current
Parent
ifXEntry
Groups
2

Walk the column to discover its indexed instances, or supply every index to read one instance.

Walk the column
/usr/bin/snmpbulkwalk -v2c -c '<community>' -Pud -Ir -OQUs -m 'IF-MIB' -M '/opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp' 'udp:<hostname>:161' 'IF-MIB::ifName'
More examples
Read one indexed instance
/usr/bin/snmpget -v2c -c '<community>' -Pud -Ir -OQUv -m 'IF-MIB' -M '/opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp' 'udp:<hostname>:161' 'IF-MIB::ifName.<index>'
Translate to a numeric OID
/usr/bin/snmptranslate -Pud -Ir -On -m 'IF-MIB' -M '/opt/observium/mibs/rfc:/opt/observium/mibs/net-snmp' 'IF-MIB::ifName'

Syntax

Source
SNMPv2-TCDisplayString
Base type
OctetString
Display format
255a
Type Description
Represents textual information taken from the NVT ASCII
          
character set, as defined in pages 4, 10-11 of RFC 854.
          
To summarize RFC 854, the NVT ASCII repertoire specifies:
          
  - the use of character codes 0-127 (decimal)
          
  - the graphics characters (32-126) are interpreted as
    US ASCII
          
  - NUL, LF, CR, BEL, BS, HT, VT and FF have the special
    meanings specified in RFC 854
          
  - the other 25 codes have no standard interpretation
          
  - the sequence 'CR LF' means newline
          
  - the sequence 'CR NUL' means carriage-return
          
  - an 'LF' not preceded by a 'CR' means moving to the
    same column on the next line.
          
  - the sequence 'CR x' for any x other than LF or NUL is
    illegal.  (Note that this also means that a string may
    end with either 'CR LF' or 'CR NUL', but not with CR.)
          
Any object defined using this syntax may not exceed 255
characters in length.

Values & Constraints

Type Constraints
range: 0..255