opMaps Configuration Guide


Configuring opMaps for Open-AudIT

Configuration Prerequisites

  • The individual performing this configuration has some Linux experience
  • NMIS8 is installed in /usr/local/nmis8
  • opMaps is installed into /usr/local/opmantek according to the installation guide
  • Root access is available (not always needed but much easier)
  • Perl 5.10 
  • RRDtool 1.4.7

Tell opMaps to use Open-AudIT

You will need to edit the configuration file /usr/local/opmantek/conf/Maps.nmis and make some simple changes.

To do this you will need to:

  • Change your current directory to  /usr/local/opmantek/conf/
  • Edit the file Maps.nmis
  • Change 'Open-AudIT_ENABLED' => 'false', to be 'Open-AudIT_ENABLED' => 'true',

Tell opMaps where Open-AudIT is

opMaps needs to know where Open-AudIT is so it can collect data from it.

  • Edit the file Maps.nmis
  • Find the configuration option 'Open-AudIT_SERVER' => 'http://localhost/open-audit',

  • This will need to be the same where your Open-AudIT server is running, if you are using a machine server.domain.com and to access Open-AudIT you browse to http://server.domain.com/open-audit, this is what you would enter 'Open-AudIT_SERVER' => 'http://server.domain.com/open-audit'

  • If you are using the Opmantek NMIS VM you would use a URL like this http://server.domain.com/open-audit

Setting Locations in Open-AudIT

As at version 1.0.3 of Open-AudIT we have opMaps integration.

To enable opMaps in Open-AudIT, do the following as an Open-AudIT user with Admin level access.

Click the menu item Admin -> Config and set the correct URL for opMaps. This will enable a link on the opMaps icon in the header of the Open-AudIT pages.

Click the menu item Admin -> Locations -> Add Location. Adding Locations for opMaps is very easy. Enter the location details and click the "Get Lat / Long" button. You should see the latitude and longitude fields populated. These values are derived by submitting the location details to the Google API for Maps. You can also enter the Lat / Long manually. If you would prefer a different Lat / Long to the actual address details, but don't know the actual Lat / Long, you can populate the GeoCode field and click the "Get Lat / Long" button. This will populate the Lat / Long fields with the GeoCode address, rather than the entered address details. If both GeoCode and address details are populated, the "Get Lat/Long" button will use the GeoCode as preferred.

If you select the "Activate Group" checkbox a Group will be created that will auto update when any devices are assigned to the given location.

To assign a device to a location you can view the device details and go to Summary -> Location / Contact on the left side menu. Clicking the blue dash (or text if already populated) in the Location Name field will change it to a drop down box. You can then select the location you wish the device to be allocated to.

To assign multiple devices to a location (say for example a selected subnet), you can view any Group list as an Open-AudIT Admin user and select the devices you need by the checkboxes on the right side of the report. Next click the "Edit" button in the report table header. You can then edit any manual fields, but importantly you can change the location of all selected devices. Click the Submit button at the bottom of the form to enact the change.

Once you have locations created, devices assigned to them and the URL for opMaps populated, you can click the opMaps icon in the header and be sent to the opMaps web page. The page will show all your locations and when a location is clicked a summary of the number of each type of device in that location.

Configuring opMaps for NMIS

Configuration Prerequisites

  • The individual performing this configuration has some Linux experience
  • NMIS8 is installed in /usr/local/nmis8
  • opMaps is installed into /usr/local/opmantek according to the installation guide
  • Root access is available (not always needed but much easier)
  • Perl 5.10 
  • RRDtool 1.4.7

Create Map File

After installing opMaps, you will need to set up the GroupLocations.nmis so opMaps can display a geographic map of your NMIS status.

To do this you will need to :

  • Change your current directory to  /usr/local/opmantek/bin/
  • Execute the Perl script configmaps.pl

This script creates the Map Files based on the NMIS Node files.

Usage: ./configmaps.pl <NODES> <GroupLocations>

cd /usr/local/opmantek/bin/
./configmaps.pl /usr/local/nmis8/conf/Nodes.nmis /usr/local/opmantek/conf/GroupLocations.nmis

Configure Map File

After creating GroupLocations.nmis, you may edit the file in the directory /usr/local/opmantek/conf/

vi /usr/local/opmantek/conf/GroupLocations.nmis

The following text is an example of what a GroupLocations.nmis file might look like

%hash = (
 'NMIS8' => {
  'Customer' => 'Opmantek',
  'Location' => 'Bundall, Queensland',
  'Group' => 'NMIS8'
 }
);

In this example  'NMIS8' represents a map entry.

'Customer' => or 'Business' => The name of the business/customer which is the name of the map.

'Location' => The location of each of the business/customer (Geodata).

'Group' => The NMIS group which relates to that business/customer.

By editing these you could change the groups that display on different maps.

Multi-Map Configuration Example

Lets take an example, like a network with four groups, which represents a company with operations in Australia and the America's.  The groups we have in NMIS are MexicoCity, NewYorkCity, Brisbane, GoldCoast.  We want to end up with three maps, the "Default" map for all the locations and a regional map for each region.

%hash = (
  'GoldCoast-Global' => {
    'Customer' => 'Opmantek-Global',
    'Location' => 'Bundall, Queensland',
    'Group' => 'GoldCoast'
  },
  'Brisbane-Global' => {
    'Customer' => 'Opmantek-Global',
    'Location' => 'Brisbane, Queensland',
    'Group' => 'Brisbane'
  },
  'MexicoCity-Global' => {
    'Customer' => 'Opmantek-Global',
    'Location' => 'Mexico City, Mexico',
    'Group' => 'MexicoCity'
  },
  'NewYorkCity-Global' => {
    'Customer' => 'Opmantek-Global',
    'Location' => 'New York City, New York',
    'Group' => 'NewYorkCity'
  },
  'GoldCoast-AU' => {
    'Customer' => 'Opmantek-AU',
    'Location' => 'Bundall, Queensland',
    'Group' => 'GoldCoast'
  },
  'Brisbane-AU' => {
    'Customer' => 'Opmantek-AU',
    'Location' => 'Brisbane, Queensland',
    'Group' => 'Brisbane'
  },
 'MexicoCity-NA' => {
    'Customer' => 'Opmantek-NA',
    'Location' => 'Mexico City, Mexico',
    'Group' => 'MexicoCity'
  },
  'NewYorkCity-NA' => {
    'Customer' => 'Opmantek-NA',
    'Location' => 'New York City, New York',
    'Group' => 'NewYorkCity'
  },
); 

Then you need to tell opMaps which map is the default map to load when it starts, by default the default map name is "Default", but you can change this by editing Maps.nmis

vi /usr/local/opmantek/conf/Maps.nmis

Find the following line under 'mapview' => 

'defaultMap' => 'Default'

Replace the defaultMap with the map you want loaded, in our case "Opmantek-Global:.

eg: 'defaultMap' => 'Opmantek-Global'

Configuring Map Links (Network Links)

NMIS supports Links, it automatically looks at your network and determines the links it can see.  It then generates the file /usr/local/nmis8/conf/Links.nmis, you can add sections to this manually and NMIS will keep them and add more (if it finds any).  

You can configure opMaps to use the NMIS links to display links on your maps.  Have a look at the Links.nmis file.

cat ../nmis8/conf/Links.nmis 
%hash = (
 '192.168.88.0' => {
 'link' => 'LAN',
 'depend' => 'N/A',
 'interface1' => 'FastEthernet0/0',
 'node2' => 'localhost',
 'ifSpeed' => 100000000,
 'node1' => 'asgard',
 'net' => 'wan',
 'interface2' => 'eth0',
 'ifIndex2' => 2,
 'subnet' => '192.168.88.0',
 'role' => 'core',
 'ifIndex1' => 1,
 'mask' => '255.255.255.0',
 'ifType' => 'ethernetCsmacd'
 }
);

We will use this link named "192.168.88.0" as a link in our maps.  We need to modify the MapLinks.nmis file to add links to the maps, the default MapLinks.nmis looks like the example below.  

cat conf/MapLinks.nmis 
%hash = (
  'Link1' => {
    'Group1' => 'WAN1',
    'Group2' => 'Sales1',
    'Link' => 'BobLan'
  },
  'Link2' => {
    'Group1' => 'xAN1',
    'Group2' => 'DataCenter1',
    'Link' => 'IPTV'
  },
  'Link3' => {
    'Group1' => 'Cloud',
    'Group2' => 'HQ',
    'Link' => 'WANEDGE'
  }
);

The Group name is actually Map Entry name, from the example before it would be GoldCoast-AU for the GoldCoast group in the Map Opmantek-AU.

%hash = (
  'Link1' => {
    'Group1' => 'GoldCoast-AU',
    'Group2' => 'Brisbane-AU',
    'Link' => '192.168.88.0'
  },
  'Link2' => {
    'Group1' => 'NewYorkCity-NA',
    'Group2' => 'MexicoCity-NA',
    'Link' => '192.168.88.0'
  },
  'Link3' => {
    'Group1' => 'GoldCoast-Global',
    'Group2' => 'Brisbane-Global',
    'Link' => '192.168.88.0'
  },
  'Link4' => {
    'Group1' => 'NewYorkCity-Global',
    'Group2' => 'MexicoCity-Global',
    'Link' => '192.168.88.0'
  },
  'Link5' => {
    'Group1' => 'NewYorkCity-Global',
    'Group2' => 'Brisbane-Global',
    'Link' => '192.168.88.0'
  },
);

This will create the links and use the status and interface utilisation of the link to color code the map, if the interface goes down, the link will change color.

Configure Map Types

By default opMaps will display a "TERRAIN" style map, to use an alternate map style, open the Maps.nmis file in /usr/local/opmantek/conf/

vi /usr/local/opmantek/conf/Maps.nmis

Find the following line under 'mapview' => 

'mapTypeId' => 'mapType'

Replace the mapType with the map type you want.

eg: 'mapTypeId' => 'google.maps.MapTypeId.TERRAIN'

The Follow map types can be used

  • ROADMAP displays the default road map view
  • SATELLITE displays Google Earth satellite images
  • HYBRID displays a mixture of normal and satellite views
  • TERRAIN displays a physical map based on terrain information.

Map Centres and Zoom Levels

opMaps will automatically determine the correct map centre and zoom level for your maps, but sometimes, it will calculate the wrong centre for a human, to use an alternate map centre and zoom level you can follow the following instructions.

Configure Default Centres and Zoom Levels

To configure the default centres and  zoom levels, open the Maps.nmis file in /usr/local/opmantek/conf/

vi /usr/local/opmantek/conf/Maps.nmis

Find the following lines under 'mapview' =>

'mapCentre' => 'X, Y',
'mapZoom' => 'zoomLevel'

Replace the X,Y and zoomLevel with the value you want.

eg :

'mapCentre' => '10, -180',
'mapZoom' => '3',

Configure Centres and Zoom Levels for Different Maps

To configure the default centres and  zoom levels, open the Maps.nmis file in /usr/local/opmantek/conf/

vi /usr/local/opmantek/conf/Maps.nmis

Find the following lines under 'group' =>,

'mapCentre-groupName' => 'X, Y',
'mapZoom-groupName' => 'zoomLevel',

Replace the groupName with a group name replace the X,Y and zoomLevel with the value you want.

eg:
'mapZoom-Opmantek-US' => '5',
'mapCentre-Opmantek-EU' => '50, 20',