Visualize Traffic with Network Weathermap

Essential Open Source Network Administration Tools


1. Introduction
1.1. Document conventions
2. Installation
2.1. Install Cacti
2.2. Install and Configure NW
3. Creating Weathermaps
3.1. Weathermap Elements
3.2. The Weathermap Editor
4. Viewing Weathermaps
5. Support Information

1. Introduction

Network Weathermap, also called PHP Weathermap, is an open source network traffic visualization tool that displays a physical or logical map of strategic data collection points on your network showing traffic at these points at a given time. This can be extremely helpful to increase your understanding of traffic patterns on your network, though it may be used for visualizing any type of data that can be graphed. Network Weathermap is typically used as a Cacti plugin, though it may also be used without Cacti. It includes a web-based editor that allows you to define your maps, nodes, and links graphically using a mouse.

1.1. Document conventions

Here are the conventions used to distinguish Unix terminal window input and output.

%% Commands to be typed into a terminal window.
Command output to a terminal window.
File text.

2. Installation

To use Network Weathermap Cacti plugin requires Cacti, oddly enough, and I also recommend installing NeDi because NeDi complements Cacti and also because NeDi makes creating Cacti graphs easy, easier than creating them using Cacti's native interface.

2.1. Install Cacti

To prepare to install the Network Weathermap Cacti plugin, you must first install Cacti with plugin support using this Howto.

2.2. Install and Configure NW

To install the Network Weathermap plugin, follow these simple steps.

  • Download the Network Weathermap plugin from here, and copy it into the directory /opt/local/share/cacti/plugins/

  • Unzip the file as shown

    %% cd /opt/local/share/cacti/plugins
    %% unzip php-weathermap.zip
    
    inflating: weathermap/CHANGES      
      inflating: weathermap/COPYING      
      inflating: weathermap/HTML_ImageMap.class.php  
      inflating: weathermap/README       
      inflating: weathermap/WeatherMap.functions.php  
      inflating: weathermap/WeatherMapLink.class.php  
      inflating: weathermap/WeatherMapNode.class.php  
      inflating: weathermap/Weathermap.class.php  
      inflating: weathermap/cacti-pick.php  
      inflating: weathermap/check-gdbug.php  
      inflating: weathermap/check.php    
       creating: weathermap/configs/
      inflating: weathermap/configs/simple.conf  
      inflating: weathermap/configs/index.php  
      inflating: weathermap/configs/.htaccess  
       creating: weathermap/docs/
       creating: weathermap/docs/example/
    
    [ ... trimmed ...]
  • Edit the file /opt/local/share/cacti/include/global.php, and uncomment or add lines so that you have this sequence in order:

    $plugins = array();
    $plugins[] = 'weathermap';
  • Rename the sample Network Weathermap editor config file to prepare it for use, and open it with an editor

    %% cd /opt/local/share/cacti
    %% cp editor-config.php-dist editor-config.php
    %% nano editor-config.php

    Edit these editor-config.php variables so the editor can locate your Cacti information

    $cacti_base = '/opt/local/share/cacti';
    
    $cacti_url = "http://example.com/cacti/";
  • You must also enable the weathermap plugin in the Cacti web interface for your Cacti user. To do so, enter Console -> User Management, check the appropriate plugin checkboxes in the Realm Permissions pane as shown below, and click Save.

3. Creating Weathermaps

Before creating weathermaps, you should have decided on some data collection points to be on your map and have created Cacti graphs of those points.

The main elements of a Weathermap are nodes and links, and the most important of the two is links. Very simply, you create nodes to represent your data collection points in some way, but links are generally used to visually connect the nodes and are associated with your existing Cacti graphs.

3.1. Weathermap Elements

The main elements of a Weathermap are nodes and links, and the most important of the two is links. Very simply, you create nodes to represent your data collection points in some way, but links are generally used to visually connect the nodes and are associated with your existing Cacti graphs.

Weathermap nodes are merely endpints for your links. They are needed to terminate links on a weathermap, but they needn't represent real devices nor be associated with graphs, although it is possible to associate graphs with nodes.

Weathermap links are the key elements of a weathermap. Each end must be attached to a node, but since the input of one physical link's traffic will be the same as the output of the adjacent link, and vice-versa, a link can only have one Cacti graph associated with it. However, the creation order the ends of a link are significant, because the input and output traffic statistics on a weathermap are always given relative to first end of the link that is defined.

3.2. The Weathermap Editor

4. Viewing Weathermaps

5. Support Information

To get help with Network Weathermap, you should first consult the documentation. If that doesn’t help you may ask questions in the Cacti Weathermap plugin forum. Before asking a question, be sure to search the forum to see if your question has already been asked.