Versions Compared

Key

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

...

Code Block
keiths@lodur:/usr/local/nmis8$ /usr/local/nmis8/bin/nmis.pl type=collect node=asgard model=true force=true
MODEL loadInfo asgard class=system:
  :  oid=1.3.6.1.4.1.9.9.43.1.1.1.0 name=configLastChanged value=2046
  :  oid=1.3.6.1.4.1.9.9.43.1.1.3.0 name=bootConfigLastChanged value=0
  :  oid=1.3.6.1.4.1.9.9.43.1.1.2.0 name=configLastSaved value=38597471
MODEL loadInfo asgard class=system:
  :  oid=1.3.6.1.4.1.9.9.25.1.1.1.2.5 name=softwareVersion value=12.4(25f)
  :  oid=processorRam name=processorRam value=99.61 Mb
  :  oid=chassisVersion name=chassisVer value=7.0
  :  oid=1.3.6.1.4.1.9.9.42.1.1.1.0 name=rttMonApplVersion value=2.2.0 Round Trip Time MIB
  :  oid=chassisId name=serialNum value=FHK11472788
  :  oid=1.3.6.1.4.1.9.9.25.1.1.1.2.2 name=softwareImage value=C1841-ADVENTERPRISEK9-M
  :  oid=1.3.6.1.4.1.9.9.42.1.1.13.0 name=rttMonApplResponder value=enabled
MODEL loadInfo asgard class=system:
  :  oid=sysContact name=sysContact value=default
  :  oid=sysDescr name=sysDescr value=Cisco IOS Software, 1841 Software (C1841-ADVENTERPRISEK9-M), Version 12.4(25f), RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2011 by Cisco Systems, Inc.
Compiled Tue 16-Aug-11 06:21 by prod_rel_team
  :  oid=cmSystemInstalledModem name=InstalledModems value=0
  :  oid=snmpEngineTime name=sysUpTime value=44764700
  :  oid=sysObjectID name=sysObjectID value=1.3.6.1.4.1.9.1.620
  :  oid=ifNumber name=ifNumber value=10
  :  oid=sysName name=sysName value=asgard.localdomain
  :  oid=sysLocation name=sysLocation value=default
--etc--

Model Development Tool

The model discovery tool is new and is there to make things easier.  It supports several useful functions when development new models or working with existing ones.

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

Check the Existing Models

Basic mode, check the model files and look for any errors, many things are checked for, more will be added.

Code Block
/usr/local/nmis8/admin/model_discovery.pl check=true

Debug is optional and debug=3 will reveal lots of cool information if you like data modelling.

You should check keeping an eye on these errors. e.g.

Code Block


model_discovery.pl


Dealing with Many Nodes and Many Models

Auditing your Nodes and Models

The Model Audit tool is what you need a trivial tool which produces a TEXT TAB delimited output you can load into your favourite spreadsheet, so you can see which NMIS nodes are using which models and adjust accordingly.

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

Which Models use which System Health Concepts

The Model Summary tool is what you need a trivial tool which produces a TEXT TAB delimited output you can load into your favourite spreadsheet, so you can see which NMIS Models are polling for which things.

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

Releasing New Models to People

Sometimes you need to get all the models into ZIP file so you can release them to a customer.

Code Block
[keiths@thor nmis8build]$ /usr/local/nmis8/build/make_models_release
Usage: make_models_release [-s] [-z target.zip] [model1.nmis graph2.nmis...]

checks (and with -s prints) the dependencies of all listed model/graph files,
and zips them all up if -z is given.

note: if not run out of the models-install dir, then the FIRST model file's
directory will be assumed to hold ALL relevant files!

Patching Models with New Stuff

A handy template for patching model files to do something new, instead of shipping around model files.

Code Block
/usr/local/nmis8/ ls -l admin/*model*
-rwxrwx--- 1 nmis nmis  2820 Oct 24  2018 admin/compare_models.pl
-rwxrwx--- 1 nmis nmis  3487 Oct 24  2018 admin/install_cisco_model_dev.pl

Comparing Two Directories of Models Contextually

Model files are structured files (code is not really that structured), so that you can compare what has changed in your models-install to your models folders we made a handy tool.

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

Check the Syntax for all your Model files in a few Seconds

Run it, can't hurt.

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--




Code Block

-rwxrwx--- 1 nmis nmis  3638 Oct 24  2018 admin/model_audit.pl
-rwxrwx--- 1 nmis nmis  4774 Oct 24  2018 admin/modelcheck.pl
-rwxrwx--- 1 nmis nmis 20864 Jun  1 17:57 admin/model_discovery.pl
-rwxrwx--- 1 nmis nmis 20864 6362Jun Oct 24  20181 17:57 admin/model_summarydiscovery.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