Added by Yee-Ting Li, last edited by Yee-Ting Li on Apr 26, 2007  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

Introduction

The front end of the terapaths netflow monitoring software is based upon a set of perl cgi 'backend' scripts with a javascript/ajax 'frontend'.

This document details the scripts and functionality of this frontend.

Files

Files can be retrieved from the SLAC SVN at:

/afs/slac.stanford.edu/g/scs/net/netmon/repo/svn/netflow

There are also various dependencies on external perl modules which can be found at

/afs/slac.stanford.edu/g/scs/net/netmon/repo/svn/

Overview

The following tree shows all the related files to the terapaths netflow frontend.

[ytl@iepmbw:/opt/netflow]$ tree
.
|-- lib
|   `-- IEPM
|       `-- Netflow
|           |-- Display
|           |   |-- PieChart.pm
|           |   |-- SpiderChart.pm
|           |   |-- Table
|           |   |   |-- CSV.pm
|           |   |   `-- HTML.pm
|           |   |-- Table.pm
|           |   |-- TimeSeriesGraph.pm
|           |   `-- spider.pm
|           |-- Display.pm
|           |-- List.pm
|           |-- Parameters.pm
|           |-- RRDGraph
|           |   |-- Group.pm
|           |   |-- Hybrid.pm
|           |   `-- Single.pm
|           `-- RRDGraph.pm
`-- www
    |-- cgi
    |   |-- netflow-graph.cgi
    |   |-- netflow-piechart.cgi
    |   |-- netflow-protocols.cgi
    |   |-- netflow-show.cgi
    |   |-- netflow-spiderchart.cgi
    |   |-- netflow-table.cgi
    |   `-- netflow-targets.cgi
    `-- html
        |-- calendar-setup.js
        |-- calendar.js
        |-- graph.html
        |-- images
        |   |-- arrow.png
        |   |-- minus-last.gif
        |   |-- minus.gif
        |   |-- node-last.gif
        |   |-- node.gif
        |   |-- plus-last.gif
        |   `-- plus.gif
        |-- index.html
        |-- netflow.css
        |-- netflow.js
        |-- protocols.html
        |-- prototype-1.4.0.js
        `-- targets.html

The code is based upon a set of perl modules under the lib directory from which the perl cgi scripts under www/cgi rely upon. It is therefore important to put the lib path under your apache configuration.

The files under www/html are the files for the frontend of this package. They are files which will be downloaded by web clients wishing to visualise the netflow monitoring.

In particular, netflow.js contains all the fat-client code for the ajax calls to the various cgi scripts which will be run on the apache server.

Apache Configuration

# terapaths monitoring netflow html files and scripts
AddType application/xhtml+xml .xhtml
AddType application/xml .xml
AddType text/xml .xml
AddType image/svg+xml .svg
AliasMatch /netflow/(.*).html "/opt/terapaths-monitoring/www/html/$1.html"
AliasMatch /netflow/(.*).xhtml "/opt/terapaths-monitoring/www/html/$1.xhtml"
AliasMatch /netflow/(.*).js "/opt/terapaths-monitoring/www/html/$1.js"
AliasMatch /netflow/(.*).css "/opt/terapaths-monitoring/www/html/$1.css"
AliasMatch /netflow/images/(.*) "/opt/terapaths-monitoring/www/html/images/$1"
ScriptAliasMatch /netflow/(.*).cgi "/opt/terapaths-monitoring/www/cgi/$1.cgi"
# set up paths for IEPM modules
SetEnv PERL5LIB /opt/netflow/lib/:/opt/iepm/lib/

CGI Scripts

Script Description
netflow-show.cgi Returns code for the right hand main pane of the webpage, in particular it contains the layout code for the tables and graphs to be displayed.
netflow-graph.cgi Displays a timeseries graph of the supplied information through POST/GET/command line using RRDGraph
netflow-table.cgi Displays a HTML table of statistics given the supplied information through POST/GET/command line
netflow-targets.cgi Supplies a HTML list (of treeview class) of all hosts found in the XML configuration file
netflow-protocols.cgi Supplies a HTML list (of treeview class) of the services, protocols or type of servies

Libaries

Module Description Inherits From
IEPM::Netflow::Parameters Bean class of specific parameters to be passed between teh client and server to determine what to display IEPM::CGI
IEPM::Netflow::List Determines the mapping of supplied Parameter information to the physical location of RRD data on the system  
IEPM::Netflow::RRDGraph Base class to handle the generation of graphs using the RRDGraph/RRDTools package  
IEPM::Netflow::RRDGraph::Single Inherited class to deal with the plotting of simple single RRD files IEPM::Netflow::RRDGraph
IEPM::Netflow::RRDGraph::Group Inherited class to deal with the plotting of multiple groupings of RRD files as a single entity IEPM::Netflow::RRDGraph
IEPM::Netflow::RRDGraph::Hybrid Composite pattern for the management of both the Single and Group Classes IEPM::Netflow::RRDGraph
IEPM::Netflow::Display Class to handle the display of RRDGraph information  
IEPM::Netflow::Display::TimeSeriesGraph Displays timeseries information from RRD data IEPM::Netflow::Display
IEPM::Netflow::Display::Table Displays tabular information from RRD data IEPM::Netflow::Display
IEPM::Netflow::Display::Table::HTML Displays tabular information from RRD data in HTML format IEPM::Netflow::Display::Table