Skip to content

SNMP sensor picker

Since v0.18.0

Walk engine in collector, picker UI, four universal MIBs (IF, HOST-RESOURCES, ENTITY-SENSOR, UPS), apply endpoint.

Why a picker

Statically defined profile-checks used to guess what's on a device. Fine for homogeneous fleets, fails in real life:

  • Switches have 16, 24, 28, 48, or 96 ports
  • Servers have 1, 2, 4, 8 PSUs
  • UPSes have 1 or 3 battery banks
  • Storages have 4–60 disks
  • Custom sensors (door, water, smoke) are never in standard profiles

The picker does a walk on the target device, lists what's actually there, and you tick the sensors to import as profile-checks.

Workflow

sequenceDiagram
    participant U as User
    participant API
    participant C as Collector
    participant T as Target device
    U->>API: Start walk on host X
    API->>C: Walk job
    C->>T: SNMP walk (IF-MIB, HOST-RESOURCES, ENTITY-SENSOR, UPS-MIB)
    T-->>C: all existing OID indexes + values
    C->>API: Discovery result
    API-->>U: Checklist per MIB
    U->>API: Apply (chosen sensors → profile-checks)

Open the picker

On the host detail of an SNMP-capable host:

Actions → Pick SNMP sensors

The walk takes 5–60 seconds depending on device. During the run you see a spinner with the current MIB.

Walk engine

The collector walks four universal MIBs:

IF-MIB (RFC 2863)

Interface table: ifTable + ifXTable. Result: all ports with index, name, speed, operational/admin status.

Suggested checks: Interface status per port (or per up port if „active only" is ticked).

HOST-RESOURCES-MIB (RFC 2790)

Server resources: hrStorageTable (disks/filesystems), hrProcessorTable (CPU cores), hrSystemUptime.

Suggested checks: per filesystem an snmp_string disk check, per CPU core, uptime.

ENTITY-SENSOR-MIB (RFC 3433)

Hardware sensors: entPhySensorTable with sensor type (temperature, fan, voltage), value, scale, unit.

Suggested checks: per sensor an snmp check with OID entPhySensorValue.<index>.

UPS-MIB (RFC 1628)

UPS specifics: battery voltage, output load, input voltage, status.

Suggested checks: per battery bank, per output phase.

Picker UI

┌── SNMP sensors of 'sw-core' ───────────────────────────────────┐
│                                                                │
│ Walk status: ✓ Done (12 s, 184 OIDs)                           │
│                                                                │
│ Interfaces (24)                                  [Select all]  │
│   [✓] Gi1/0/1   1Gbit  up      auto-add: status                │
│   [✓] Gi1/0/2   1Gbit  up      auto-add: status                │
│   [_] Gi1/0/3   1Gbit  down                                    │
│   [✓] Gi1/0/4   1Gbit  up      auto-add: status, traffic       │
│   ...                                                          │
│                                                                │
│ Sensors (4)                                                    │
│   [✓] Temperature slot 1   45 °C   threshold: W>60 C>75        │
│   [✓] Temperature slot 2   42 °C   threshold: W>60 C>75        │
│   [✓] Fan slot 1           3200rpm                             │
│   [✓] PSU slot 1           OK                                  │
│                                                                │
│ Disks/Filesystems (—)                                          │
│   not supported on this device                                 │
│                                                                │
│ UPS sensors (—)                                                │
│   not supported on this device                                 │
│                                                                │
│  [Apply (12 sensors)]   [Cancel]                               │
└────────────────────────────────────────────────────────────────┘

Per sensor:

  • Checkbox
  • Current value (live snapshot)
  • Suggestion for threshold-warn / -crit (type-aware)
  • Optional: edit display name

Apply

Clicking Apply creates a host_service for each selected sensor with:

  • check_type matching the MIB (snmp, snmp_string, snmp_table)
  • config_overrides with concrete OID + index
  • Threshold values from suggestions
  • Default interval 60 s

Optional: „also save in profile as auto_add" — selected checks then appear on other hosts with the same profile too. Useful when building a new custom profile.

Re-walk

After hardware changes (new disk bay, swapped PSU), re-open the picker — the walk runs fresh, new sensors are marked „new since last walk", missing ones „no longer present".

API

Endpoint Purpose
POST /api/v1/snmp-discovery/walks New walk job
GET /api/v1/snmp-discovery/walks/{id} Status + results
POST /api/v1/snmp-discovery/walks/{id}/apply Selected sensors → host_services

Limitations

  • Walk needs working SNMPv2c or v3 — pure SNMPv1 lacks bulk ops, walk is slow
  • Vendor-specific OIDs (Cisco-private MIBs, APC-Pelican) not covered in V1 — see MIB snippets for vendor knowledge
  • Very large devices (96-port switch) take longer; default modal timeout is 90 s

Next