Changes between Version 1 and Version 2 of PlasticSlices/MonitoringRecommendations/FlowvisorConfiguration


Ignore:
Timestamp:
05/04/11 23:23:21 (8 years ago)
Author:
chaos@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PlasticSlices/MonitoringRecommendations/FlowvisorConfiguration

    v1 v2  
     1''DRAFT: These instructions have not yet been fully tested in their current form.  Please exercise caution.''
     2
    13[[PageOutline]]
    24
    3 Configuration instructions for monitoring on an !OpenFlow !FlowVisor are coming soon.  We will contact Plastic Slices participating campuses as soon as these instructions are available.
     5= How to configure Plastic Slices monitoring on an OpenFlow !FlowVisor =
     6
     7== Introduction ==
     8
     9This page explains how to configure an !OpenFlow !FlowVisor node for the [wiki:PlasticSlices/MonitoringRecommendations Plastic Slices central monitoring configuration].  Before following these instructions, please ask GPO infra for a copy of the tarball
     10{{{
     11plastic-slices-monitor-flowvisor-0.1.tar.gz
     12}}}
     13which is the latest version of the monitoring utilities for a !FlowVisor.  We have tested the !FlowVisor utilities on Ubuntu 10.04 only.  If you are running a different OS and it is not obvious how to translate the instructions, please contact GPO infra.
     14
     15== Variables ==
     16
     17 * `<daemonuser>`: The user as which to run the FV monitoring.  The scripts can run as root, or as a non-root user of your choice.  (At GPO, we use the `ganglia` user.)
     18 * `<site>`: a one-word phrase describing your site, probably the name of your university or lab (e.g. `stanford`, `gpolab`).  Use the same value for all hosts your site is monitoring.
     19 * `<fqdn>`: The fully-qualified domain name as which your FV should report data.  ''IF this is not the same as the output of `uname -n` on your node, pay attention to step 5 below.''
     20
     21== Steps ==
     22
     23 1. Copy the tarball over to your FV host, e.g. into `~/plastic-slices-monitor-flowvisor-0.1.tar.gz`.
     24
     25 2. Unpack the tarball in `/`:
     26{{{
     27cd /
     28sudo tar xvzf ~/plastic-slices-monitor-flowvisor-0.1.tar.gz
     29}}}
     30 This should create the following files:
     31{{{
     32/etc/init.d/metric_flowvisor
     33/usr/local/bin/build_gmoc_conf
     34/usr/local/bin/measurement_sender
     35/usr/local/bin/metric_flowvisor
     36/usr/local/bin/report_data_to_gmoc
     37/usr/local/lib/rrd_metric.py
     38}}}
     39
     40 3. Install required packages:
     41{{{
     42sudo apt-get install python-rrdtool python-daemon librrds-perl libfile-find-rule-perl libwww-perl libxml-writer-perl
     43}}}
     44 The monitoring scripts use these packages to:
     45   * Daemonize metric collection in order to retain packet counter state
     46   * Manage RRD files
     47   * Write the XML-based API format for the GMOC database
     48   * Send the formatted data to GMOC via HTTP
     49 
     50 4. Create required directories:
     51{{{
     52sudo mkdir /var/run/metrics
     53sudo chown <daemonuser> /var/run/metrics
     54
     55sudo mkdir -p /var/spool/rrds/$(uname -n)
     56sudo mkdir -p /var/spool/rrds/REPORT
     57sudo chown -R <daemonuser> /var/spool/rrds
     58}}}
     59
     60 5. IF `uname -n` does not report your node's FQDN for whatever reason, create a symlink so that reporting and reading scripts can find your RRD files:
     61{{{
     62cd /var/spool/rrds
     63sudo ln -s $(uname -n) <fqdn>
     64}}}
     65
     66 6. The `metric_flowvisor` daemon requires a flowvisor password file, which it expects to find in:
     67{{{
     68FVPASSWD_FILE = '/etc/flowvisor/fvpasswd'
     69}}}
     70 Either create a file in this location containing only the flowvisor root password, or create a file in a different location containing the password, and modify `/usr/local/bin/metric_flowvisor` to look in the new location.
     71
     72 7. Start the metric-gathering service:
     73{{{
     74sudo service metric_flowvisor start
     75}}}
     76 * This should generate a PID file in:
     77{{{
     78/var/run/metrics/flowvisor.pid
     79}}}
     80 which should contain the PID of a running python-based process.
     81 * Within two minutes or so, a number of RRD files should be created in `/var/spool/rrds/$(uname -n)`
     82
     83 8. Run the data reporting script by hand to make sure it works:
     84{{{
     85sudo -u <daemonuser> /usr/local/bin/report_data_to_gmoc <site> <fqdn>
     86}}}
     87 * This should produce no output
     88 * You should be able to browse to [http://gmoc-dev.grnoc.iu.edu/api-demo/data/], view data by Location, select your site, and find a new entry for `<fqdn>`.
     89
     90 9. Configure the metric-gathering service to start at boot:
     91{{{
     92sudo update-rc.d metric_flowvisor defaults
     93}}}
     94 10. Add the reporting script to cron: modify the `<daemonuser>` crontab:
     95{{{
     96sudo -u <daemonuser> crontab -e
     97}}}
     98 and add the new line:
     99{{{
     100*/5 * * * * /usr/local/bin/report_data_to_gmoc <site> <fqdn>
     101}}}
     102