Skip to end of metadata
Go to start of metadata

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.

Why is Interface X not being collected?

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.

Depending on your model and version of NMIS, the labels on the Interface Details page may be slightly different from the example:

  • The "Name" generally refers to the SNMP properties ifDescr or ifName (availability of the latter depends on the hardware in question)
  • "Description" almost universally refers to the SNMP property ifAlias.
  • "Type" refers to ifType.
  • "Hardware" (if present) refers to ifDescr. This is for cases where the interface "Name" is dynamically chosen from the 'best available' source (e.g. ifName or ifDescr if ifName isn't supported).

NMIS 8.6 and newer ship with models that have amended labels which include the relevant source, for example "Hardware (ifDescr)" and "Type (ifType)" for greater clarity.

Overriding NMIS' choices for one node

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.

Adjusting the node's model

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:

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

 

Global Overrides

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:

Like before, global_nocollect_noDescription is a true/false setting, whereas the others are all interpreted as regular expressions (if not missing or empty).  Keep in mind that these are regular expressions, therefore if we wanted to not collect ifType's propVirtual & l2vlan the syntax would look like this:

Please note that the checkable properties aren't  necessarily labelled the same on the Interface Details page (e.g. setting global_collect_ifDescr compares the ifDescr value against the given regular expression, but the ifDescr data is likely labelled "Name" in the GUI).

The  sequence of checks is as follows:

  1. The default for collection is true.
  2. 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.
  3. If an interface has no administrative status, or if it is 'down' or 'testing', then the interface is not collected and we stop checking criteria.
  4. Next, the other 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.
  5. After that, the model-level collection criteria are applied. The first matching 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.

  • No labels