Versions Compared

Key

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

...

model_discovery.pl was released in NMIS8.7.0G but was early version, check with Opmantek Support or grab a more recent version from GitHub:model_discovery.pl

Automated Base Model Detection and Creation

This tool started a little more generically but it can now generate a base model automatically. Based on what it discovers, when starting with a new device type to become and NMIS node this is where you should start, it will take a default model and add all the things it can find which are already modelled, this would include things from the standard MIBs.  First add your new thing into NMIS and get SNMP working, NMIS will use the Default model for this node which means SNMP is working and you can get more! 

For example where ASGARD is the name of your node in NMIS.

Code Block
/usr/local/nmis8/admin/model_discovery.pl node=ASGARD model=CiscoRouter-auto common_exclude="Windows|^tcp"

A file called /usr/local/nmis8/models/Model-CiscoRouter-auto.nmis would be created, you can now edit the node in Nodes.nmis and change model from auto to be CiscoRouter-auto and use this model.

You probably want to add some additional graphs to the nodegraph element but that can come later.

Discover What Existing Models Work on an NMIS Node

What existing modelling is there which could be useful. For example where ASGARD is the name of your node in NMIS.

Code Block
/usr/local/nmis8/admin/model_discovery.pl node=ASGARD file=/tmp/ASGARD.txt errors=false

The resulting file is a TAB delimited CSV and looks like below, it will help you understand which other existing modelling might work on this node :

nodenodeModelTypeFilePathSupportedSNMP_ObjectSNMP_OIDOID_Usedresult
ASGARDCiscoRoutersystemCommon-Cisco-netflow.nmisCommon/system/rrd/NetFlowStats/snmp/PktsExportedYES1.3.6.1.4.1.9.9.387.1.4.4.01.3.6.1.4.1.9.9.387.1.4.4.01.3.6.1.4.1.9.9.387.1.4.4.0307129
ASGARDCiscoRoutersystemModel-CatalystIOS.nmisModel/system/rrd/nodehealth/snmp/RouteNumberYESipCidrRouteNumber1.3.6.1.2.1.4.24.31.3.6.1.2.1.4.24.318
ASGARDCiscoRoutersystemCommon-mib2ip.nmisCommon/system/rrd/mib2ip/snmp/ipFragFailsYESipFragFails1.3.6.1.2.1.4.181.3.6.1.2.1.4.180
ASGARDCiscoRoutersystemCommon-tcp.nmisCommon/system/rrd/tcp/snmp/tcpActiveOpensYEStcpActiveOpens1.3.6.1.2.1.6.51.3.6.1.2.1.6.515892
ASGARDCiscoRoutersystemCommon-mib2ip.nmisCommon/system/rrd/mib2ip/snmp/ipForwDatagramsYESipForwDatagrams1.3.6.1.2.1.4.61.3.6.1.2.1.4.6141405097
ASGARDCiscoRoutersystemModel-CGESM.nmisModel/system/rrd/nodehealth/snmp/avgBusy1YESavgBusy11.3.6.1.4.1.9.2.1.571.3.6.1.4.1.9.2.1.578
ASGARDCiscoRoutersystemModel-CircuitMonitor.nmisModel/system/sys/modem/snmp/InstalledModemsYEScmSystemInstalledModem1.3.6.1.4.1.9.9.47.1.1.11.3.6.1.4.1.9.9.47.1.1.10
ASGARDCiscoRoutersystemCommon-mib2ip.nmisCommon/system/rrd/mib2ip/snmp/ipReasmReqdsYESipReasmReqds1.3.6.1.2.1.4.141.3.6.1.2.1.4.140
ASGARDCiscoRoutersystemModel-ACME-Packet.nmisModel/system/sys/standard/snmp/sysDescrYESsysDescr1.3.6.1.2.1.1.11.3.6.1.2.1.1.1Cisco IOS Software, 1841 Software (C1841-ADVENTERPRISEK9-M), Version 12.4(25f), RELEASE SOFTWARE (fc2)\nTechnical Support: http://www.cisco.com/techsupport\nCopyright (c) 1986-2011 by Cisco Systems, Inc.\nCompiled Tue 16-Aug-11 06:21 by prod_rel_team
ASGARDCiscoRoutersystemCommon-Cisco-netflow.nmisCommon/system/rrd/NetFlowStats/snmp/SampledPacketYES1.3.6.1.4.1.9.9.387.1.4.1.01.3.6.1.4.1.9.9.387.1.4.1.01.3.6.1.4.1.9.9.387.1.4.1.00
ASGARDCiscoRoutersystemHealthCommon-Cisco-cbqos.nmisCommon/systemHealth/sys/Cisco_CBQoSYEScbQosIfType1.3.6.1.4.1.9.9.166.1.1.1.1.21.3.6.1.4.1.9.9.166.1.1.1.1.2$VAR1 = {    '1.3.6.1.4.1.9.9.166.1.1.1.1.2.1085' => 1  };  
ASGARDCiscoRoutersystemModel-CGESM.nmisModel/system/rrd/nodehealth/snmp/bufferElFreeYESbufferElFree1.3.6.1.4.1.9.2.1.91.3.6.1.4.1.9.2.1.91117
ASGARDCiscoRoutersystemCommon-mib2ip.nmisCommon/system/rrd/mib2ip/snmp/ipReasmOKsYESipReasmOKs1.3.6.1.2.1.4.151.3.6.1.2.1.4.150
ASGARDCiscoRoutersystemCommon-Cisco-system.nmisCommon/system/sys/extra/snmp/chassisVerYESchassisVersion1.3.6.1.4.1.9.3.6.21.3.6.1.4.1.9.3.6.27

And what modelling will NOT work on this node.

nodenodeModelTypeFilePathSupportedSNMP_ObjectSNMP_OIDOID_Usedresult
ASGARDCiscoRoutersystemModel-Teldat-iM8.nmisModel/system/rrd/modem/snmp/InstalledModemNO1.3.6.1.4.1.2007.1.2.1.51.3.6.1.4.1.2007.1.2.1.51.3.6.1.4.1.2007.1.2.1.5noSuchObject
ASGARDCiscoRoutersystemModel-PulseSecure.nmisModel/system/sys/extra/snmp/iveTotalHitsNO1.3.6.1.4.1.12532.14.01.3.6.1.4.1.12532.14.01.3.6.1.4.1.12532.14.0noSuchObject
ASGARDCiscoRoutersystemHealthModel-AlcatelASAM.nmisModel/systemHealth/sys/eqptBoardNOeqptSlotPlannedType1.3.6.1.4.1.637.61.1.23.3.1.21.3.6.1.4.1.637.61.1.23.3.1.2$VAR1 = undef;  
ASGARDCiscoRoutersystemHealthCommon-Cisco-memory.nmisCommon/systemHealth/sys/ciscoMemoryPoolNOMemPoolName
$VAR1 = undef;  
ASGARDCiscoRoutersystemModel-HuaweiSwitchesCore.nmisModel/system/rrd/nodehealth/snmp/hwMemoryDevFreeNO1.3.6.1.4.1.2011.6.3.5.1.1.2.0.1.01.3.6.1.4.1.2011.6.3.5.1.1.2.0.1.01.3.6.1.4.1.2011.6.3.5.1.1.2.0.1.0noSuchObject
ASGARDCiscoRoutersystemModel-Eltek.nmisModel/system/rrd/power/snmp/ACMainsNO1.3.6.1.4.1.12148.9.7.1.11.01.3.6.1.4.1.12148.9.7.1.11.01.3.6.1.4.1.12148.9.7.1.11.0noSuchObject
ASGARDCiscoRoutersystemModel-CiscoASR.nmisModel/system/rrd/nodehealth/snmp/avgBusy1NOcpmCPUTotal1minRev.21.3.6.1.4.1.9.9.109.1.1.1.1.7.21.3.6.1.4.1.9.9.109.1.1.1.1.7.2noSuchInstance
ASGARDCiscoRoutersystemModel-MGE-ups.nmisModel/system/rrd/upsvolt/snmp/upsinputvolt3NOupsInputVoltage.31.3.6.1.2.1.33.1.3.3.1.3.31.3.6.1.2.1.33.1.3.3.1.3.3noSuchObject
ASGARDCiscoRoutersystemHealthCommon-lldp.nmisCommon/systemHealth/sys/lldpLocalNOlldpLocPortDesc1.0.8802.1.1.2.1.3.7.1.41.0.8802.1.1.2.1.3.7.1.4$VAR1 = undef;  
ASGARDCiscoRoutersystemHealthModel-f5big_ip.nmisModel/systemHealth/sys/F5_CPUNOsysPlaneStatEntry.1.3.6.1.4.1.3375.2.1.12.2.2.1.1.3.6.1.4.1.3375.2.1.12.2.2.1$VAR1 = undef;  

Check the Existing Models

...

Code Block
/usr/local/nmis8/admin/modelcheck.pl

--snip--
 Processing /usr/local/nmis8/models/Common-Windows-interface.nmis
  Processing /usr/local/nmis8/models/Model-TELDATL1.nmis
String found where operator expected at (eval 483) line 38, near "}
      'calls'"
	(Missing operator before 
      'calls'?)
  Processing /usr/local/nmis8/models/Graph-lockstat.nmis
--snip--

Show the model Structure

Useful for some people

Code Block
/usr/local/nmis8/
Code Block
-rwxrwx--- 1 nmis nmis 20864 Jun  1 17:57 admin/model_discovery.pl
-rwxrwx--- 1 nmis nmis  1573 Oct 24  2018 admin/show_model_structure.pl
-rwxrwx--- 1 nmis nmis 17324 Dec  4 18:39 admin/upgrade_models.pl