Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To be successful with modelling a device you need a few things before you start.

Table of Contents

Once you have this in hand checkout the more detailed device modelling documentation here: Developing Device Models for NMIS

Device Modelling Preparation

Device Access

...

For devices with proprietary MIB's or Enterprise MIBS, you should obtain them from the vendor, Google is very helpful and add them to your MIB's in ~/mibs, before doing the SNMP walk.

Commands to run:

.

For a large collection of MIB files which have been error corrected, you can find many MIBS on Keith Sinclair's GitHub MIB Repo

Organise your MIBS.

If you do not have any vendor MIBS, download the MIBS from the GitHub Repo

Code Block
cd ~
wget https://github.com/kcsinclair/mibs/archive/master.zip
unzip master.zip
mv mibs-master mibs

If you have MIBS from your vendor

Code Block
mkdir ~/mibs
cp <vendor mib file(s)> ~/mibs
cp /usr/local/nmis8/mibs/traps/* ~/mibs 
snmpwalk -

Test your SNMP WALK and MIBS

Code Block
snmpwalk -m ALL -M ~/mibs -v 2c -c GOODCOMMUNITY <HOSTNAME or IP ADDRESS> system 

Does SNMP Bulk Walk work?

Code Block
snmpbulkwalk -m ALL -M ~/mibs -v 2c -c GOODCOMMUNITY <HOSTNAME or IP ADDRESS> system 

...

Run a full walk and redirect to a file, note that you can use snmpbulkwalk on many devices when using SNMPv2C, this greatly improves the speed of collection on very large devices.

Code Block
snmpwalk -m ALL -M ~/mibs -v 2c -c GOODCOMMUNITY <HOSTNAME or IP ADDRESS> .1 > ~/VENDOR-Product.mib

or

snmpbulkwalk -m ALL -M ~/mibs -v 2c -c GOODCOMMUNITY <HOSTNAME or IP ADDRESS> .1 > ~/VENDOR-Product.mib

Now you have an SNMP Dump.

SNMP WALK with Numerical OIDS

If you are seeking support for device modelling, getting the SNMP walk results as numerical OID's only is very useful, as this can be used in an SNMP simulator.  There is a translate tool available to map the OIDs we well, https://github.com/kcsinclair/mibs/blob/master/translate_snmpwalk.pl

Code Block
snmpwalk -v2c -c COMMUNITY String -ObentU IPADDRESS_OR_NODENAME 1.3.6 > myagent.snmpwalk

Goal for Modelling

What is the goal for the modelling?  Just standard type support, or more advanced collection, do you want to collect some performance data about how a protocol is operating, or verify the number of sessions a firewall is running.

...

This page has great information about Modelling MIBS that use Indexes using the systemHealth section.

Developing Device Models for NMIS

Checkout the handy training we developed for NMIS users, this is available here: 

Checklist for Model Development

The training covers this in details, but here is a quick summary of what needs to be updated and changed when adding new device support with modelling

  • Update nmis8/models/Model.nmis
  • New model file created and updated
    • update the nodeVendor, nodeModel, nodeType fields (among others)
  • Any new resolvable OID's added to nmis_oids.nmis, e.g. the sysObjectID names.
  • Update Common-heading.nmis
  • Update Common-database.nmis
  • Create any needed graphs
  • Update Common-threshold.nmis
  • Update Common-stats.nmis

Creating Thresholds with NMIS Modelling

Main collection is /systemHealth/rrd/hrProcessorLoad

Common-database entry called hrProcessorLoad

Common-heading entry for the /systemHealth/rrd/hrProcessorLoad/graphtype => hrprocload

To create a threshold, statistical data is needed, this is extracted using Common-stats and this is based on the rrd name, so for this hrProcessorLoad collection, the Common-stats entry would be hrProcessorLoad

To compare the data to the threshold, there needs to be a Common-threshold section, this is named after the /systemHealth/rrd/hrProcessorLoad/threshold => arCpuLoad

So that the threshold system can match data from the stats results, we use the item to match the data, so NMIS is going to look for the item in the resulting stats data, in this case the item name is hrProcessorLoad, which matches the print statement: 'PRINT:hrProcessorLoad:AVERAGE:hrProcessorLoad=%1.0f' in the Common-stats section.

...

.

...