Skip to main content

What are Device Models?

NMIS device models define how network devices are monitored through SNMP. Each model specifies:
  • SNMP OID mappings - Which OIDs to collect and how to interpret them
  • Data collection sections - Interface stats, system health, environmental sensors
  • Alert thresholds - When to generate notifications
  • Graph definitions - How to visualize collected data
  • Device identification - How to match devices using systemObjectID

Model Structure

Device models are Perl hash structures stored in .nmis files:
%hash = (
  'systemHealth' => {
    'sys' => {
      'env-temp' => {
        'indexed' => 'entSensorStatus',
        'headers' => 'tempDescr,currentTemp',
        'snmp' => {
          'tempDescr' => {
            'oid' => 'entPhysicalDescr',
            'title' => 'Description'
          },
          'currentTemp' => {
            'oid' => 'entSensorValue',
            'title' => 'Current Temp (C)'
          }
        }
      }
    },
    'rrd' => {
      'env-temp' => {
        'indexed' => 'true',
        'graphtype' => 'env-temp',
        'snmp' => {
          'currentTemp' => {
            'oid' => 'entSensorValue'
          }
        }
      }
    }
  },
  'alerts' => {
    'env-temp' => {
      'tempStatus' => {
        'type' => 'threshold-rising',
        'threshold' => {
          'Critical' => '95',
          'Major' => '90'
        }
      }
    }
  }
);

Model Types

Base Models (Model-*.nmis)

Define complete device configurations including:
  • System identification (sysObjectID patterns)
  • System health sections to collect
  • Interface collection settings
  • Device-specific features
Located in: models-default/

Common Models (Common-*.nmis)

Reusable monitoring components that can be included in base models:
  • Common-Cisco-cbqos.nmis - Class-based QoS monitoring
  • Common-Cisco-power.nmis - Power supply monitoring
  • Common-Cisco-temp.nmis - Temperature sensor monitoring
  • Common-Huawei-NQA.nmis - Network Quality Analysis
  • Common-Juniper-jnxCoS.nmis - Class of Service statistics
Located in: models-default/

Device Identification

NMIS matches devices to models using the SNMP sysObjectID:
'systemHealth' => {
  'sys' => {
    'sysObjectID' => {
      'oid' => '1.3.6.1.2.1.1.2.0'
    }
  }
}
The Model.nmis file contains autodiscovery rules:
'Cisco' => {
  'order' => {
    '10' => {
      'CiscoRouter' => 'cisco.*router',
      'CiscoSwitch' => 'cisco.*switch',
      'CiscoNexus' => 'nexus'
    }
  }
}

SNMP OID Mapping

Models map SNMP OIDs to meaningful metrics:

Using MIB Names

'tempDescr' => {
  'oid' => 'entPhysicalDescr',
  'title' => 'Description'
}

Using Numeric OIDs

'PowerOperStatus' => {
  'oid' => '1.3.6.1.4.1.9.9.117.1.1.2.1.2',
  'snmpObjectName' => 'cefcFRUPowerOperStatus'
}

Value Replacement

'tempStatus' => {
  'oid' => 'entSensorStatus',
  'replace' => {
    '1' => 'ok',
    '2' => 'unavailable',
    '3' => 'nonoperational'
  }
}

Model Sections

systemHealth

Monitors device-specific components:
  • sys - Displays values in the GUI
  • rrd - Stores time-series data for graphing

interface

Collects interface statistics (traffic, errors, discards)

alerts

Defines alert conditions and thresholds

database

Specifies RRD file locations and naming

heading

Defines graph titles and descriptions

Supported Vendor Categories

NMIS includes pre-built models for:
  • Cisco - IOS, IOS-XE, IOS-XR, NX-OS devices
  • Huawei - VRP platform devices
  • Juniper - JUNOS devices
  • F5 - BIG-IP load balancers
  • Windows - WMI-based monitoring
  • SynologyNAS - NAS devices
  • NutanixAHV - Hypervisor monitoring
  • Host Resources - Generic SNMP devices
  • Generic - Universal monitoring via standard MIBs
Models in models-default/ are managed by Opmantek. Custom models should be created in models-custom/ to prevent overwriting during upgrades.

Model Inheritance

Models support inheritance through common sections:
'-common-' => {
  'class' => {
    'Cisco-cbqos' => {
      'common-model' => 'Cisco-cbqos'
    },
    'Cisco-power' => {
      'common-model' => 'Cisco-power'
    }
  }
}
This includes monitoring definitions from Common-Cisco-cbqos.nmis and Common-Cisco-power.nmis.

Data Collection Process

  1. Device Discovery - NMIS queries sysObjectID and matches to model
  2. Model Loading - Base model + common models are loaded
  3. SNMP Collection - OIDs defined in ‘sys’ and ‘rrd’ sections are polled
  4. Data Storage - RRD files store time-series metrics
  5. Alert Evaluation - Thresholds are checked against current values
  6. Graph Generation - RRD data is rendered as graphs

Next Steps

Build docs developers (and LLMs) love