Changes between Version 11 and Version 12 of PlasticSlices/MonitoringRecommendations/FlowvisorConfiguration


Ignore:
Timestamp:
07/08/11 12:38:31 (11 years ago)
Author:
chaos@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PlasticSlices/MonitoringRecommendations/FlowvisorConfiguration

    v11 v12  
    55== Introduction ==
    66
    7 This 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
     7This page explains how to configure an !OpenFlow !FlowVisor node for the [wiki:PlasticSlices/MonitoringRecommendations Plastic Slices central monitoring configuration].  This page was written for
    88{{{
    9 plastic-slices-monitor-flowvisor-0.4.tar.gz
     9plastic-slices-monitor-flowvisor-0.6
    1010}}}
    11 which 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.
     11and may not work well with earlier versions.  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.
    1212
    1313== Variables ==
     
    1515 * `<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.)
    1616 * `<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.
    17  * `<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.''
     17 * `<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 section IV below.''
    1818
    19 == Steps ==
     19== Steps to configure FlowVisor monitoring ==
    2020
    21  1. Copy the tarball over to your FV host, e.g. into `~/plastic-slices-monitor-flowvisor-0.4.tar.gz`.
     21=== I. Prepare to submit authenticated monitoring data to GMOC ===
    2222
    23  2. Unpack the tarball in `/`:
     23You need to do these steps if you are installing monitoring for the first time, or if you are upgrading from version 0.5 or previous.
     24
     25 1. Register site credentials: IF you have not yet registered your site to submit data to GMOC, follow the instructions at [wiki:GENIMetaOps/SiteCredentials].  All site resources use the same credential; you only need to do this step once for your entire site.  '''Note: the password you use for your site registration is a new password generated for the purpose of submitting monitoring data.  Do not reuse any existing passwords from your site.'''
     26
     27 2. Store your site password in a file which !FlowVisor monitoring can use:
    2428{{{
    25 cd /
    26 sudo tar xvzf ~/plastic-slices-monitor-flowvisor-0.4.tar.gz
     29sudo touch /usr/local/etc/monitoring_passwd
     30sudo chown <cronuser> /usr/local/etc/monitoring_passwd
     31sudo chmod 600 /usr/local/etc/monitoring_passwd
     32sudo vi /usr/local/etc/monitoring_passwd
    2733}}}
    28  This should create the following files:
     34 Add exactly one line to this file, containing the site monitoring password you registered with GMOC.
     35
     36=== II. Install the monitoring software ===
     37
     38Do all of these steps every time you install or upgrade the monitoring software.
     39
     40 1. Download the `plastic-slices-monitor-flowvisor-0.6.tar.gz` tarball from [http://software.geni.net/local-sw/], and copy it onto your FV host, e.g. into `~/plastic-slices-monitor-flowvisor-0.6.tar.gz`.
     41
     42 2. Download the GMOC `measurement_sender.pl` script from [http://gmoc-db.grnoc.iu.edu/sources/measurement_api/measurement_sender.pl], and copy it onto your FV host, e.g. into `~/measurement_sender.pl`
     43
     44 3. Unpack the tarball in `~`, and copy the files into place:
    2945{{{
    30 /usr/local/bin/build_gmoc_conf
    31 /usr/local/bin/measurement_sender
    32 /usr/local/bin/metric_flowvisor
    33 /usr/local/bin/report_data_to_gmoc
    34 /usr/local/lib/flowvisor_metrics.py
    35 /usr/local/lib/rrd_metric.py
     46cd ~
     47tar xvzf ~/plastic-slices-monitor-flowvisor-0.6.tar.gz
     48cd plastic-slices-monitor-flowvisor-0.6
     49sudo mkdir -p /usr/local/{bin,lib}
     50sudo cp bin/{build_gmoc_conf,metric_flowvisor,report_data_to_gmoc} /usr/local/bin
     51sudo cp lib/{flowvisor_metrics.py,rrd_metric.py} /usr/local/lib
     52sudo chmod 555 /usr/local/bin/{build_gmoc_conf,metric_flowvisor,report_data_to_gmoc}
     53sudo chmod 444 /usr/local/lib/{flowvisor_metrics.py,rrd_metric.py}
    3654}}}
    3755
    38  3. Install required packages:
     56 4. Copy `measurement_sender` into place:
    3957{{{
    40 sudo apt-get install python-rrdtool librrds-perl libfile-find-rule-perl libwww-perl libxml-writer-perl
     58sudo cp ~/measurement_sender.pl /usr/local/bin/measurement_sender
     59sudo chmod 555 /usr/local/bin/measurement_sender
     60}}}
     61
     62=== III. Install software dependencies ===
     63
     64When installing or upgrading, make sure you have all current software dependencies installed on the system:
     65
     66{{{
     67sudo apt-get install python-rrdtool librrds-perl libfile-find-rule-perl libwww-perl libxml-writer-perl libcrypt-ssleay-perl
    4168}}}
    4269 The monitoring scripts use these packages to:
    4370   * Manage RRD files
    4471   * Write the XML-based API format for the GMOC database
    45    * Send the formatted data to GMOC via HTTP
     72   * Send the formatted data to GMOC via HTTPS
     73
     74=== IV. Create required directories and files ===
     75
     76These steps only need to be done the first time you install the monitoring software.
    4677 
    47  4. Create required directories:
     78 1. Create required directories:
    4879{{{
    4980sudo mkdir -p /var/cache/fvmetrics/monitoring
     
    5586}}}
    5687
    57  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:
     88 2. 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:
    5889{{{
    5990cd /var/spool/rrds
     
    6192}}}
    6293
    63  6. The `metric_flowvisor` script requires a flowvisor password file, which it expects to find in:
     94 3. The `metric_flowvisor` script requires a flowvisor password file, which it expects to find in:
    6495{{{
    6596FVPASSWD_FILE = '/etc/flowvisor/fvpasswd'
     
    6798 This file should contain the password for the flowvisor root slice.  (This is the password you use with command-line tools such as `fvctl` or `fvconfig` to configure a flowvisor, or which you entered in the "Setup !FlowVisor" dialog in the Expedient OIM when you setup your flowvisor.)
    6899
    69  7. Check the time on your flowvisor host, and make sure it is accurate. The timeseries data reporting format relies on clock accuracy, so your nodes must be running ntpd (or ntpdate regularly out of cron) in order for monitoring to work.
     100=== V. Test the script ===
    70101
    71  8. Run the metric gathering script by hand to make sure it works:
     102Run the monitoring and submission scripts by hand to make sure they work.
     103
     104 1. Check the time on your flowvisor host, and make sure it is accurate. The timeseries data reporting format relies on clock accuracy, so your nodes must be running ntpd (or ntpdate regularly out of cron) in order for monitoring to work.
     105
     106 2. Run the metric gathering script by hand to make sure it works:
    72107{{{
    73108sudo -u <cronuser> /usr/local/bin/metric_flowvisor
     
    76111   * After this runs, a number of RRD files should be created in `/var/spool/rrds/$(uname -n)`
    77112
    78  9. Run the data reporting script by hand to make sure it works:
     113 3. Run the data reporting script by hand to make sure it works:
    79114{{{
    80115sudo -u <cronuser> /usr/local/bin/report_data_to_gmoc <site> <fqdn>
    81116}}}
    82117   * This should produce no output
    83    * 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>`.
    84  10. Add the two scripts to cron: modify the `<cronuser>` crontab:
     118   * You should be able to browse to [http://gmoc-db.grnoc.iu.edu/api-demo/], view data by Location, select your site, and find an entry for `<fqdn>`.
     119
     120=== VI. Install the scripts to run from cron ===
     121
     122This only needs to be done the first time you install the monitoring software.
     123
     124Add the two scripts to cron: modify the `<cronuser>` crontab:
    85125{{{
    86126sudo -u <cronuser> crontab -e
    87127}}}
    88  and add the new lines:
     128and add the new lines:
    89129{{{
    90130*/1 * * * * /usr/local/bin/metric_flowvisor