Handling different location attributes in NMIS

Locations, location and sysLocation what's the difference?

NMIS has two different location attributes.  "location" and "sysLocation" .  NMIS and the OMK apps also make use of the Locations table.  So what are all these location attributes?

sysLocation

This is the default location information you see in most places when you have done no configuration associated with locations in NMIS.  sysLocation is an attribute we collect for almost all devices using SNMP.  A device such as a router may have it's location configured so that when NMIS queries the device's "MIB-2 SYSTEM" mib it returns the sysLocation string.  If the device has no location information configured then this will return as "default".

Locations and location

The "location" device attribute is the name of an entry in NMIS's "Locations" table.  You use the Locations table to create a set of location information which NMIS and OMK apps then use for geographic data such as GeoCodable locations for Geographic maps.  You associate a device to one of the locations in the table, this can be done through the gui by editing the devices "Location" entry which is a drop down of the available locations in the Locations table.  It is also possible to import devices with their location by providing a "location" attribute in the import csv or directly in the Nodes.nmis file.

 

Using location vs sysLocation

By default you will see that NMIS uses the sysLocation field for location in most places, this will not provide geographic features with the information needed and will not show the location information you have entered for device in NMIS in most cases.

You can change how NMIS uses location information, in older versions this is a little more involved in newer versions it is much simpler.

See here for updating your OMK applications such as opCharts, opEvents etc

Updating NMIS version 8.6.1 and newer to location vs sysLocation

You can select to either use sysLocation (the default) or location for the devices location information.
In the gui "System"->"SystemConfiguration"->"NMIS Configuration"  then select section "System"
Change the "location_field_name" from "sysLocation" to "location".
You can also remove "sysLocation" from being displayed as one of the nodes attributes by removing "sysLocation" from the list of attributes in 'network_viewNode_field_list' in the System section
Instead of using the GUI you can do this by editing the file nmis8/conf/Config.nmis as shown here:

 

Config.nmis edits
# new configuration option to have a configurable field to use for location, e.g. sysLocation or location. currently set to sysLocation change to
'location_field_name' => 'location’,  
# changed from 'sysLocation'
 
#have location attribute included in node summary information
'node_summary_field_list' => 'host,uuid,customer,businessService,serviceStatus,snmpdown,wmidown,remote_connection_name,remote_connection_url,host_addr,location',
#Note location has been added to the end of the list.
'network_viewNode_field_list' => 'status,outage,sysName,host_addr,group,customer,location,businessService,serviceStatus,nodeType,nodeModel,polling_policy,sysUpTime,sysContact,sysDescr,ifNumber,lastUpdate,nodeVendor,sysObjectName,roleType,netType',    
## delete just 'sysLocation' from this list 


 

Using older NMIS versions

To change it in older versions of NMIS you will need to look for the use of sysLocation in Table defiintions, widgets and Config.nmis and change them to location as appropriate. We typically use a recursive grep to find the references to sysLocation in use on a system.