NMIS comes with sensible defaults for collecting (interface) data, but naturally no configuration can work perfectly for everybody.
This document briefly describes how you can control what interfaces and related data NMIS should collect.
If you check the "interfaces" tab for a node (note: not the "active interfaces"), you'll see a panel similar to the following screenshot:
The most relevant column is the "Collect on" to the right: only interfaces with collect set to true will be handled by NMIS. NMIS will collect or not collect an interface for a variety of reasons, most of which are configurable. Let's click on the Interface link for GigabitEthernet1/0/6:
The "Reason" describes why NMIS has decided to not collect this interface; in this particular case the model for the device has specified that interfaces without Description are to be ignored.
If you only want to override NMIS for one or two interfaces on a single node then you might use the Node Configuration system to adjust the "collect" setting to your liking. This is documented on the Node Configuration page.
It's more likely that you'll want the same collect/nocollect choices for all nodes of a particular type, i.e. sharing the same model. NMIS offers very flexible mechanisms to express this policy: a model can contain a section called "nocollect" containing a number of criteria which will be checked when NMIS analyzes the node (during a type=update
operation).
Here is an example:
'nocollect' => { 'ifOperStatus' => 'null', 'ifDescr' => 'sublayer|null|controller', 'Description' => '^#', 'noDescription' => 'true', 'ifType' => 'other|softwareloopback|propVirtual|slip' } |
The conditions are interpreted as regular expressions (except for noDescription
). If any one of those criteria matches, then the interface data is NOT collected. Condition entries that are not present in the model are ignored. In addition to the regular expression conditions, there is the noDescription
true/false setting which controls whether interface without textual description should be ignored or not.
In the example above, the ifDescr
condition will exclude interfaces that match sublayer for example; the Description
condition deselects interfaces whoose textual description starts with "#", ifType
ensures that only physical interfaces are considered, and ifOperstatus
deselects interfaces with an unknown operational status.
To edit any of these with the NMIS GUI, select the "System" menu, sub-menu "System Configuration" and then "NMIS Models". Select either one of the nodes in question, or the model, and then scroll down to the section "interface". Near the top of the various settings you'll see the "nocollect" section.
Please note that changing any entries in the "nocollect" section will only begin to affect nodes when the next type=update
operation is performed (which by default is once every 24hrs).
The per-model criteria also interact with (and can be overridden by) certain global settings. Here are the relevant defaults as shipped with NMIS' Config.nmis:
'globals' => { 'global_collect_Description' => '(CNOC|Collection)', 'global_collect_ifDescr' => '', 'global_nocollect_ifOperStatus' => '', 'global_nocollect_ifDescr' => '', 'global_nocollect_Description' => '', 'global_nocollect_noDescription' => '', 'global_nocollect_ifType' => '', # ...plus other unrelated global_XYZ settings }, |
Like before, global_nocollect_noDescription
is a true/false setting, whereas the others are all interpreted as regular expressions (if not missing or empty).
The sequence of checks is as follows:
global_collect_Description
and global_collect_ifDescr
are checked first. If they're non-empty, and the interface matches either, it's collected and no further criteria a applied.global_nocollect_*
critieria are checked. If we find one that is non-empty and matches the interface, the interface is NOT collected and no further criteria are checked.nocollect
rule causes the interface to NOT be collected and terminates the sequence of checks.(Should you ever be interested in the gory details, check out bin/nmis.pl
and look for sub getIntfInfo
.)
To adjust any of these settings from the NMIS GUI, go to the "System" menu, submenu "System Configuration" and then "NMIS Configuration"; select section "globals".
Please note that changes to any of these globals also don't become effective until the next type=update
operation is performed.