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

05/04/11 23:23:21 (8 years ago)



  • PlasticSlices/MonitoringRecommendations/FlowvisorConfiguration

    v1 v2  
     1''DRAFT: These instructions have not yet been fully tested in their current form.  Please exercise caution.''
    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 =
     7== Introduction ==
     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
     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.
     15== Variables ==
     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.''
     21== Steps ==
     23 1. Copy the tarball over to your FV host, e.g. into `~/plastic-slices-monitor-flowvisor-0.1.tar.gz`.
     25 2. Unpack the tarball in `/`:
     27cd /
     28sudo tar xvzf ~/plastic-slices-monitor-flowvisor-0.1.tar.gz
     30 This should create the following files:
     40 3. Install required packages:
     42sudo apt-get install python-rrdtool python-daemon librrds-perl libfile-find-rule-perl libwww-perl libxml-writer-perl
     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
     50 4. Create required directories:
     52sudo mkdir /var/run/metrics
     53sudo chown <daemonuser> /var/run/metrics
     55sudo mkdir -p /var/spool/rrds/$(uname -n)
     56sudo mkdir -p /var/spool/rrds/REPORT
     57sudo chown -R <daemonuser> /var/spool/rrds
     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:
     62cd /var/spool/rrds
     63sudo ln -s $(uname -n) <fqdn>
     66 6. The `metric_flowvisor` daemon requires a flowvisor password file, which it expects to find in:
     68FVPASSWD_FILE = '/etc/flowvisor/fvpasswd'
     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.
     72 7. Start the metric-gathering service:
     74sudo service metric_flowvisor start
     76 * This should generate a PID file in:
     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)`
     83 8. Run the data reporting script by hand to make sure it works:
     85sudo -u <daemonuser> /usr/local/bin/report_data_to_gmoc <site> <fqdn>
     87 * This should produce no output
     88 * You should be able to browse to [], view data by Location, select your site, and find a new entry for `<fqdn>`.
     90 9. Configure the metric-gathering service to start at boot:
     92sudo update-rc.d metric_flowvisor defaults
     94 10. Add the reporting script to cron: modify the `<daemonuser>` crontab:
     96sudo -u <daemonuser> crontab -e
     98 and add the new line:
     100*/5 * * * * /usr/local/bin/report_data_to_gmoc <site> <fqdn>