You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 35 Next »


 

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 = (
  'Opmantek-Global1' => {
    'Customer' => 'Opmantek-Global',
    'Location' => 'Bundall, Queensland',
    'Group' => 'GoldCoast'
  },
  'Opmantek-Global2' => {
    'Customer' => 'Opmantek-Global',
    'Location' => 'Brisbane, Queensland',
    'Group' => 'Brisbane'
  },
  'Opmantek-Global3' => {
    'Customer' => 'Opmantek-Global',
    'Location' => 'Mexico City, Mexico',
    'Group' => 'MexicoCity'
  },
  'Opmantek-Global4' => {
    'Customer' => 'Opmantek-Global',
    'Location' => 'New York City, New York',
    'Group' => 'NewYorkCity'
  },
  'Opmantek-AU1' => {
    'Customer' => 'Opmantek-AU',
    'Location' => 'Bundall, Queensland',
    'Group' => 'GoldCoast'
  },
  'Opmantek-AU2' => {
    'Customer' => 'Opmantek-AU',
    'Location' => 'Brisbane, Queensland',
    'Group' => 'Brisbane'
  },
 'Opmantek-NA1' => {
    'Customer' => 'Opmantek-NA',
    'Location' => 'Mexico City, Mexico',
    'Group' => 'MexicoCity'
  },
  'Opmantek-NA2' => {
    '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'

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',
  • No labels