Skip to content

MIB snippets

Since v0.19.0

Snippet loader, YAML format with name, version, display_name, vendor, oids[], discoveries[].

While the SNMP sensor picker walks universal MIBs (IF, HOST-RESOURCES, ENTITY-SENSOR, UPS), vendor specifics need their own knowledge source. That source is a MIB snippet — a YAML file with OIDs, status mappings, discovery hints.

Snippets are data, not code. New vendors or device families can be added without releasing a new Vesana version.

Why YAML

Variant Pro Con
Hardcode in collector Fast first iteration Recompile per vendor, blocks Vesana releases
Data (YAML) Hot-loadable, community-extensible, vendor details without code Slight loader overhead

YAML wins — the speed has never become a bottleneck.

Format

Example cisco-envmon.yaml:

name: cisco-envmon
version: 1
display_name: "Cisco Environment Monitoring"
vendor: cisco
description: "Temperature, fans, power supplies on Catalyst and ISR."

# Devices this snippet recognizes
matches:
  sysoid_patterns:
    - "^.1.3.6.1.4.1.9.1\\."           # all Cisco
  sysdescr_patterns:
    - "Cisco IOS"
    - "Cisco Catalyst"

# Structured OIDs for walk
discoveries:
  - id: temperature_sensors
    walk_oid: ".1.3.6.1.4.1.9.9.13.1.3.1"   # ciscoEnvMonTemperatureStatusTable
    columns:
      index:        ".1.3.6.1.4.1.9.9.13.1.3.1.1"
      description:  ".1.3.6.1.4.1.9.9.13.1.3.1.2"
      value:        ".1.3.6.1.4.1.9.9.13.1.3.1.3"
      threshold:    ".1.3.6.1.4.1.9.9.13.1.3.1.4"
      state:        ".1.3.6.1.4.1.9.9.13.1.3.1.6"
    state_mapping:
      1: OK
      2: WARNING
      3: CRITICAL
      4: CRITICAL
      5: NO_DATA

  - id: fan_sensors
    walk_oid: ".1.3.6.1.4.1.9.9.13.1.4.1"
    ...

  - id: power_supplies
    walk_oid: ".1.3.6.1.4.1.9.9.13.1.5.1"
    ...

Available snippets (v0.19.0)

Snippet Vendor What it covers
cisco-envmon Cisco Temperature, fans, PSU on Catalyst/ISR
cisco-stack Cisco Stack members, master/backup status
aruba-cx HPE Aruba CX CPU, memory, sensors
aruba-procurve HPE Aruba ProCurve Switch sensors, PoE
apc-powernet APC Battery, input/output, self-test
dell-idrac Dell PowerEdge iDRAC health, PSU, drives
fortinet-fortigate Fortinet CPU, sessions, VPN tunnels
sonicwall SonicWall Connections, VPN, failover
synology-storage Synology DSM Volumes, disks, RAID state
qnap QNAP QTS Volumes, disks, fans
unifi-snmp-light Ubiquiti UniFi Basic CPU, memory, ports

Snippets live in collector/snippets/ in the repo and are bundled in the collector image.

Custom snippet

Steps for a new vendor integration:

1 — Get MIB files

From the vendor (Cisco download, IETF RFC, etc.). We need OIDs in numeric form, not symbolic.

2 — Test with snmpwalk

snmpwalk -v 2c -c public 192.168.1.1 .1.3.6.1.4.1.<enterprise>.<...>

Note relevant columns and index structures.

3 — Write YAML

File in collector/snippets/<vendor>-<topic>.yaml:

name: my-vendor-temp
version: 1
display_name: "MyVendor Temperature"
vendor: my-vendor
description: "Custom temperature sensor detection"

matches:
  sysoid_patterns:
    - "^.1.3.6.1.4.1.99999\\."

discoveries:
  - id: temperatures
    walk_oid: ".1.3.6.1.4.1.99999.1.1.1"
    columns:
      index:       ".1.3.6.1.4.1.99999.1.1.1.1"
      name:        ".1.3.6.1.4.1.99999.1.1.1.2"
      value:       ".1.3.6.1.4.1.99999.1.1.1.3"
    default_threshold:
      warn: 60
      crit: 75
    unit: "°C"

4 — Test locally

docker compose -f docker-compose.dev.yml restart collector
docker compose -f docker-compose.dev.yml logs collector | grep "Snippet loaded"

Then in the UI: open the SNMP picker on a device with matching sysOID — new sensors show under MyVendor Temperature.

5 — Submit to Vesana

Pull request against collector/snippets/. Once merged, the snippet ships in the next collector release.

Load order

  1. Built-in snippets from the image
  2. Custom snippets from /etc/vesana-collector/snippets/ (volume mount on the collector VM)
  3. Match order: more specific sysOID patterns win over generic

Limitations

  • Snippets describe SNMP walks only — no SSH commands, no HTTP API calls
  • Complex derived values (e.g. CPU load as difference of two OIDs) need code in the collector
  • For custom logic: monitoring scripts (see Monitoring → Scripts)

Next