Changes between Version 6 and Version 7 of PlasticSlices/MonitoringRecommendations/FlowvisorConfiguration


Ignore:
Timestamp:
05/11/11 11:17:55 (9 years ago)
Author:
chaos@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PlasticSlices/MonitoringRecommendations/FlowvisorConfiguration

    v6 v7  
    1 ''WARNING: The flowvisor monitoring code is currently under construction.  Make sure gpo-infra knows you want a copy, and we'll get you one as soon as it is working again.''
    2 
    31[[PageOutline]]
    42
     
    97This 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
    108{{{
    11 plastic-slices-monitor-flowvisor-0.1.tar.gz
     9plastic-slices-monitor-flowvisor-0.2.tar.gz
    1210}}}
    1311which 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.
     
    1513== Variables ==
    1614
    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.)
     15 * `<cronuser>`: 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.)
    1816 * `<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.
    1917 * `<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.''
     
    2119== Steps ==
    2220
    23  1. Copy the tarball over to your FV host, e.g. into `~/plastic-slices-monitor-flowvisor-0.1.tar.gz`.
     21 1. Copy the tarball over to your FV host, e.g. into `~/plastic-slices-monitor-flowvisor-0.2.tar.gz`.
    2422
    2523 2. Unpack the tarball in `/`:
    2624{{{
    2725cd /
    28 sudo tar xvzf ~/plastic-slices-monitor-flowvisor-0.1.tar.gz
     26sudo tar xvzf ~/plastic-slices-monitor-flowvisor-0.2.tar.gz
    2927}}}
    3028 This should create the following files:
    3129{{{
    32 /etc/init.d/metric_flowvisor
    3330/usr/local/bin/build_gmoc_conf
    3431/usr/local/bin/measurement_sender
    3532/usr/local/bin/metric_flowvisor
    3633/usr/local/bin/report_data_to_gmoc
     34/usr/local/lib/flowvisor_metrics.py
    3735/usr/local/lib/rrd_metric.py
    3836}}}
     
    4038 3. Install required packages:
    4139{{{
    42 sudo apt-get install python-rrdtool python-daemon librrds-perl libfile-find-rule-perl libwww-perl libxml-writer-perl
     40sudo apt-get install python-rrdtool librrds-perl libfile-find-rule-perl libwww-perl libxml-writer-perl
    4341}}}
    4442 The monitoring scripts use these packages to:
    45    * Daemonize metric collection in order to retain packet counter state
    4643   * Manage RRD files
    4744   * Write the XML-based API format for the GMOC database
     
    5047 4. Create required directories:
    5148{{{
    52 sudo mkdir /var/run/metrics
    53 sudo chown <daemonuser> /var/run/metrics
     49sudo mkdir -p /var/cache/fvmetrics/monitoring
     50sudo chown <cronuser> /var/cache/fvmetrics/monitoring
    5451
    5552sudo mkdir -p /var/spool/rrds/$(uname -n)
    5653sudo mkdir -p /var/spool/rrds/REPORT
    57 sudo chown -R <daemonuser> /var/spool/rrds
     54sudo chown -R <cronuser> /var/spool/rrds
    5855}}}
    5956
     
    6461}}}
    6562
    66  6. The `metric_flowvisor` daemon requires a flowvisor password file, which it expects to find in:
     63 6. The `metric_flowvisor` script requires a flowvisor password file, which it expects to find in:
    6764{{{
    6865FVPASSWD_FILE = '/etc/flowvisor/fvpasswd'
    6966}}}
    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.
     67 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 set the correct value for `FVPASSWD_FILE`.
    7168
    72  7. The `metric_flowvisor` service init script contains a variable indicating which username to use when running the metric daemon.
    73    * Edit the file `/etc/init.d/metric_flowvisor`
    74    * Near the top of that file, correct the METRIC_USER setting for your environment:
     69 7. Run the metric gathering script by hand to make sure it works:
    7570{{{
    76 METRIC_USER=<daemonuser>
     71sudo -u <cronuser> /usr/local/bin/metric_flowvisor
    7772}}}
    78  8. Start the metric-gathering service:
     73   * This should produce no output
     74   * After this runs, a number of RRD files should be created in `/var/spool/rrds/$(uname -n)`
     75
     76 8. Run the data reporting script by hand to make sure it works:
    7977{{{
    80 sudo service metric_flowvisor start
    81 }}}
    82    * This should generate a PID file in:
    83 {{{
    84 /var/run/metrics/flowvisor.pid
    85 }}}
    86    which should contain the PID of a running python-based process.
    87    * Within two minutes or so, a number of RRD files should be created in `/var/spool/rrds/$(uname -n)`
    88 
    89  9. Run the data reporting script by hand to make sure it works:
    90 {{{
    91 sudo -u <daemonuser> /usr/local/bin/report_data_to_gmoc <site> <fqdn>
     78sudo -u <cronuser> /usr/local/bin/report_data_to_gmoc <site> <fqdn>
    9279}}}
    9380   * This should produce no output
    9481   * 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>`.
    9582
    96  10. Configure the metric-gathering service to start at boot:
     83 9. Add the two scripts to cron: modify the `<cronuser>` crontab:
    9784{{{
    98 sudo update-rc.d metric_flowvisor defaults
     85sudo -u <cronuser> crontab -e
    9986}}}
    100  11. Add the reporting script to cron: modify the `<daemonuser>` crontab:
     87 and add the new lines:
    10188{{{
    102 sudo -u <daemonuser> crontab -e
    103 }}}
    104  and add the new line:
    105 {{{
     89*/1 * * * * /usr/local/bin/metric_flowvisor
    10690*/5 * * * * /usr/local/bin/report_data_to_gmoc <site> <fqdn>
    10791}}}