Objects

Objects define the SNMP objects and attributes that may be polled by the SNMP Input.

The location of the object definition files is specified by EF_INPUT_SNMP_OBJECT_DEFINITIONS_DIRECTORY_PATH in the collectors configuration options. The default location is /etc/elastiflow/snmp/objects.

Configuration Example

IF-MIB::ifEntry:
  mib: IF-MIB
  object: ifEntry
  index:
    - type: Integer
      oid: .1.3.6.1.2.1.2.2.1.1
      name: netif
      syntax: InterfaceIndex
  discovery_attribute: ifDescr
  attributes:
    ifDescr:
      oid: .1.3.6.1.2.1.2.2.1.2
      tag: true
      name: netif.descr
      syntax: DisplayString
    ifType:
      oid: .1.3.6.1.2.1.2.2.1.3
      tag: true
      name: netif.type
      syntax: IANAifType
    ifSpeed:
      oid: .1.3.6.1.2.1.2.2.1.5
      name: netif.bandwidth.bw
      syntax: Gauge32
    ifPhysAddress:
      oid: .1.3.6.1.2.1.2.2.1.6
      tag: true
      name: netif.mac
      syntax: PhysAddress
    ifAdminStatus:
      oid: .1.3.6.1.2.1.2.2.1.7
      name: netif.state.admin
      syntax: EnumInteger
    ifOperStatus:
      oid: .1.3.6.1.2.1.2.2.1.8
      name: netif.state.oper
      syntax: EnumInteger
    ifInOctets:
      oid: .1.3.6.1.2.1.2.2.1.10
      name: netif.bytes.in
      syntax: Counter32
    ifInUcastPkts:
      oid: .1.3.6.1.2.1.2.2.1.11
      name: netif.packets.ucast.in
      syntax: Counter32
    ifInDiscards:
      oid: .1.3.6.1.2.1.2.2.1.13
      name: netif.packets.discard.in
      syntax: Counter32
    ifInErrors:
      oid: .1.3.6.1.2.1.2.2.1.14
      name: netif.packets.error.in
      syntax: Counter32
    ifInUnknownProtos:
      oid: .1.3.6.1.2.1.2.2.1.15
      name: netif.packets.unkproto.in
      syntax: Counter32
    ifOutOctets:
      oid: .1.3.6.1.2.1.2.2.1.16
      name: netif.bytes.out
      syntax: Counter32
    ifOutUcastPkts:
      oid: .1.3.6.1.2.1.2.2.1.17
      name: netif.packets.ucast.out
      syntax: Counter32
    ifOutDiscards:
      oid: .1.3.6.1.2.1.2.2.1.19
      name: netif.packets.discard.out
      syntax: Counter32
    ifOutErrors:
      oid: .1.3.6.1.2.1.2.2.1.20
      name: netif.packets.error.out
      syntax: Counter32

Configuration Attributes

mib

Contains the name of the SNMP MIB where the object is defined.

EXAMPLE: mib: IF-MIB

object

Contains the name of the SNMP object which the attributes. This is usually one level up from where the attributes are defined.

EXAMPLE: object: ifEntry

index (optional)

The Object Identifier (OID) of a value provided by an agent is made of of the OID of the values definition and the ID of the index of the value within the agent. Scalar SNMP values will always have an index of .0. The index of values within an SNMP conceptual table is defined in the MIB by the INDEX clause.

This option describes the contents of the index, and how the collector will process them. The following are examples of index definitions.

:::caution An contains attributes from a conceptual table must include either index or augments definition. If both are omitted, the object's attributes must be only scalar values. :::

A single value index:

index:
  - type: Integer
    oid: .1.3.6.1.2.1.2.2.1.1
    name: netif
    syntax: InterfaceIndex

A multi-value index:

index:
  - type: IpAddress
    oid: .1.3.6.1.2.1.14.17.1.1
    name: ospf.lsdb.link_local.lsa.netif # ospfLocalLsdbIpAddress
    syntax: IpAddress
  - type: Integer32
    oid: .1.3.6.1.2.1.14.17.1.2
    name: ospf.lsdb.link_local.lsa.netif # ospfLocalLsdbAddressLessIf
    syntax: InterfaceIndexOrZero
  - type: Integer
    oid: .1.3.6.1.2.1.14.17.1.3
    name: ospf.lsdb.link_local.lsa.type # ospfLocalLsdbType
    syntax: EnumInteger
  - type: IpAddress
    oid: .1.3.6.1.2.1.14.17.1.4
    name: ospf.lsdb.link_local.lsa.lsid # ospfLocalLsdbLsid
    syntax: IpAddressNoSuffix
  - type: IpAddress
    oid: .1.3.6.1.2.1.14.17.1.5
    name: ospf.lsdb.link_local.lsa.router.id # ospfLocalLsdbRouterId
    syntax: IpAddressNoSuffix # RouterID

type

Defines the type of the index value. Valid values are:

  • Integer

  • OctetString

  • ImplicitOctetString

  • ObjectIdentifier

  • ImplicitObjectIdentifier

  • Integer32

  • IpAddress

  • MacAddress

  • Unsigned32

  • Opaque

oid

The OID of the index value's MIB definition.

EXAMPLE: oid: .1.3.6.1.2.1.2.2.1.1

name

The name of the field in the output record to which the value will be assigned.

syntax

The syntax of the value. See below for details on all supported syntax values.

augments (optional)

An object which "augments" another object shares the index definition of that object.

:::caution An contains attributes from a conceptual table must include either index or augments definition. If both are omitted, the object's attributes must be only scalar values. :::

EXAMPLE: augments: IF-MIB::ifEntry

discovery_attribute

The attribute defined in the attributes section which will be inspected to discover all available indices.

attributes

The attributes section contains a list of SNMP MIB values to collect for this object.

oid

The OID of the value's MIB definition.

EXAMPLE: oid .1.3.6.1.2.1.31.1.1.1.6

tag (optional)

Specifies whether the attribute is "tag", also referred to as a "label" or "dimension" by various time-series datastores, or a metric value.

Default: tag: false

name

The name of the field in the output record to which the attribute's value will be assigned.

syntax

The syntax of the value. See below for details on all supported syntax values.

overrides (optional)

A common SNMP pattern is the instrumentation of both 32-bit and 64-bit variations of a value. In such scenarios it is unnecessary to collect both values. For example, when the 64-bit value is available it should be preferred, or "override" the 32-bit version.

This attribute defines the object and attribute that an attribute should override, if available.

EXAMPLE:

overrides:
  object: IF-MIB::ifEntry
  attribute: ifOutOctets

object

The object of the attribute to be overridden.

attribute

The attribute of to be overridden.

rediscover

Defines whether the attribute can trigger a rediscovery, and how the value is evaluated to trigger the rediscovery. Valid values are:

  • OnChange - Any change in the value compared to the previous poll.

  • OnReset - A reduction in the value compared to the previous poll.

Supported syntax Types

The syntax field specifies how the raw SNMP values should be interpreted by the ElastiFlow Unified SNMP Collector. Object index and attribute definitions support the follow syntax values.

SNMPv2-SMI (RFC 2578) Types

SNMPv2-TC (RFC 2579) Types

FLOAT-TC-MIB (RFC 6340) Types

HCNUM-TC (RFC 2856) Types

Common MIB-defined Types

Enumerated Types

Unit Types

Unit types can be defined for any attribute with an underlying type of Integer, Integer32, Unsigned32, Gauge32, Counter32, Counter64, Float32 or Float64.

Bandwidth Types

Bandwidth types are normalized to bits/sec and output as a 64-bit unsigned value.

Byte Types

Byte types are normalized to bytes and output as a 64-bit unsigned value.

Decibel Types

Decibel types are normalized to decibels and output as a 64-bit float value.

Signal Level Types

Signal Level types are normalized to dBm and output as a 64-bit float value.

Current Types

Current types are normalized to amps and output as a 64-bit float value.

Energy Types

Energy types are normalized to joules and output as a 64-bit float value.

Timestamp Types

Timestamp types are normalized to a quantity of time units since epoch, as specified by EF_PROCESSOR_TIMESTAMP_PRECISION, and output as a 64-bit unsigned value.

Frequency Types

Frequency types are normalized to hertz and output as a 64-bit float value.

Length Types

Length types are normalized to meters and output as a 64-bit float value.

Operation Duration Types

Operation Duration types are normalized to nanoseconds and output as a 64-bit float value.

Percentage Types

Percentage types are normalized to either a 0-1 or 0-100 based percentage, as specified by EF_PROCESSOR_PERCENT_NORM, and output as a 64-bit float value.

Power Types

Power types are normalized to watts and output as a 64-bit float value.

Rate Types

Rate types are normalized to quantity/sec and output as a 64-bit float value.

Temperature Types

Temperature types are normalized to degrees celsius and output as a 64-bit float value.

Duration Types

Duration types are normalized to a quantity of time units, as specified by EF_PROCESSOR_DURATION_PRECISION, and output as a 64-bit unsigned value.

Voltage Types

Voltage types are normalized to volts and output as a 64-bit float value.

Wavelength Types

Wavelength types are normalized to nanometers and output as a 64-bit float value.