Skip to content

Feature: Fingerprint-based module discovery #1468

@SuperQ

Description

@SuperQ

In order to make it easier to implement many SNMP monitoring systems do varying amounts of automatic discovery.

To solve this in the Prometheus ecosystem we could implement some amount of target feature discovery in the snmp_exporter.

Fingerprint-based module discovery

Now that we support multiple modules in a single scrape we should be able to add a fingerprint-based matching system to the generator and configuration.

Example:

modules:
  # SNMPv2-MIB for things like sysDescr, sysUpTime, etc.
  system:
    walk:
      - "SNMPv2-MIB::system"

fingerprinters:
  system:
    discovery_modules:
      - system
    matchers:
      - oid: "SNMPv2-MIB::sysObjectID"
        label: sysObjectID
        regex: "1.3.6.1.4.1.41112" # The ubnt enterprises in UBNT-MIB
        modules:
          - if_mib
          - ubiquiti_unifi

Then the target params would look like this:

http://localhost:9116/snmp?fingerprint=system&target=my-target

Since the target device returns this:

# HELP sysObjectID The vendor's authoritative identification of the network management subsystem contained in the entity - 1.3.6.1.2.1.1.2
# TYPE sysObjectID gauge
sysObjectID{sysObjectID="1.3.6.1.4.1.41112"} 1

The exporter would be able to match the UBNT-MIB matcher and include additional walks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions