Changes between Version 14 and Version 15 of PlasticSlices/MonitoringRecommendations/FlowvisorConfiguration


Ignore:
Timestamp:
04/30/12 11:14:33 (12 years ago)
Author:
chaos@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PlasticSlices/MonitoringRecommendations/FlowvisorConfiguration

    v14 v15  
    1 [[PageOutline]]
    2 
    3 = How to configure Plastic Slices monitoring on an OpenFlow !FlowVisor =
    4 
    5 == Introduction ==
    6 
    7 This page explains how to configure an !OpenFlow !FlowVisor node for the [wiki:PlasticSlices/MonitoringRecommendations Plastic Slices central monitoring configuration].  This page was written for
    8 {{{
    9 plastic-slices-monitor-flowvisor-0.8
    10 }}}
    11 and 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.
    12 
    13 == Upgrading from version 0.7 ==
    14 
    15 If you are currently running `plastic-slices-monitor-flowvisor-0.7`, you need only do the following steps of this upgrade:
    16  * [#II.Installthemonitoringsoftware II. Install the monitoring software itself and the latest version of GMOC measurement_sender]
    17  * [#V.Testthescript V. Test the new script and make sure it still works]
    18 
    19 If you are installing `plastic-slices-monitor-flowvisor` for the first time or upgrading from an earlier version, read all sections to see which steps you need to take.
    20 
    21 == Variables ==
    22 
    23  * `<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.)
    24  * `<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.
    25  * `<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.''
    26 
    27 == Steps to configure FlowVisor monitoring ==
    28 
    29 === I. Prepare to submit authenticated monitoring data to GMOC ===
    30 
    31 You 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.
    32 
    33  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.'''
    34 
    35  2. Store your site password in a file which !FlowVisor monitoring can use:
    36 {{{
    37 sudo touch /usr/local/etc/monitoring_passwd
    38 sudo chown <cronuser> /usr/local/etc/monitoring_passwd
    39 sudo chmod 600 /usr/local/etc/monitoring_passwd
    40 sudo vi /usr/local/etc/monitoring_passwd
    41 }}}
    42  Add exactly one line to this file, containing the site monitoring password you registered with GMOC.
    43 
    44 === II. Install the monitoring software ===
    45 
    46 Do all of these steps every time you install or upgrade the monitoring software.
    47 
    48  1. Download the `plastic-slices-monitor-flowvisor-0.8.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.8.tar.gz`.
    49 
    50  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`
    51 
    52  3. Unpack the tarball in `~`, and copy the files into place:
    53 {{{
    54 cd ~
    55 tar xvzf ~/plastic-slices-monitor-flowvisor-0.8.tar.gz
    56 cd plastic-slices-monitor-flowvisor-0.8
    57 sudo mkdir -p /usr/local/{bin,lib}
    58 sudo cp bin/{build_gmoc_conf,metric_flowvisor,report_data_to_gmoc} /usr/local/bin
    59 sudo cp lib/{flowvisor_metrics.py,rrd_metric.py} /usr/local/lib
    60 sudo chmod 555 /usr/local/bin/{build_gmoc_conf,metric_flowvisor,report_data_to_gmoc}
    61 sudo chmod 444 /usr/local/lib/{flowvisor_metrics.py,rrd_metric.py}
    62 }}}
    63 
    64  4. Copy `measurement_sender` into place:
    65 {{{
    66 sudo cp ~/measurement_sender.pl /usr/local/bin/measurement_sender
    67 sudo chmod 555 /usr/local/bin/measurement_sender
    68 }}}
    69 
    70 === III. Install software dependencies ===
    71 
    72 When installing or upgrading, make sure you have all current software dependencies installed on the system:
    73 
    74 {{{
    75 sudo apt-get install python-rrdtool librrds-perl libfile-find-rule-perl libwww-perl libxml-writer-perl libcrypt-ssleay-perl
    76 }}}
    77  The monitoring scripts use these packages to:
    78    * Manage RRD files
    79    * Write the XML-based API format for the GMOC database
    80    * Send the formatted data to GMOC via HTTPS
    81 
    82 === IV. Create required directories and files ===
    83 
    84 These steps only need to be done the first time you install the monitoring software.
    85  
    86  1. Create required directories:
    87 {{{
    88 sudo mkdir -p /var/cache/fvmetrics/monitoring
    89 sudo chown <cronuser> /var/cache/fvmetrics/monitoring
    90 
    91 sudo mkdir -p /var/spool/rrds/$(uname -n)
    92 sudo mkdir -p /var/spool/rrds/REPORT
    93 sudo chown -R <cronuser> /var/spool/rrds
    94 }}}
    95 
    96  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:
    97 {{{
    98 cd /var/spool/rrds
    99 sudo ln -s $(uname -n) <fqdn>
    100 }}}
    101 
    102  3. The `metric_flowvisor` script requires a flowvisor password file, which it expects to find in:
    103 {{{
    104 FVPASSWD_FILE = '/etc/flowvisor/fvpasswd'
    105 }}}
    106  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.)
    107 
    108 === V. Test the script ===
    109 
    110 Run the monitoring and submission scripts by hand to make sure they work.
    111 
    112  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.
    113 
    114  2. Run the metric gathering script by hand to make sure it works:
    115 {{{
    116 sudo -u <cronuser> /usr/local/bin/metric_flowvisor
    117 }}}
    118    * This should produce no output
    119    * After this runs, a number of RRD files should be created in `/var/spool/rrds/$(uname -n)`
    120 
    121  3. Run the data reporting script by hand to make sure it works:
    122 {{{
    123 sudo -u <cronuser> /usr/local/bin/report_data_to_gmoc <site> <fqdn>
    124 }}}
    125    * This should produce no output
    126    * 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>`.
    127 
    128 === VI. Install the scripts to run from cron ===
    129 
    130 This only needs to be done the first time you install the monitoring software.
    131 
    132 Add the two scripts to cron: modify the `<cronuser>` crontab:
    133 {{{
    134 sudo -u <cronuser> crontab -e
    135 }}}
    136 and add the new lines:
    137 {{{
    138 */1 * * * * /usr/local/bin/metric_flowvisor
    139 */5 * * * * /usr/local/bin/report_data_to_gmoc <site> <fqdn>
    140 }}}
     1Direct monitoring of FlowVisor is deprecated.  We now recommend using tango-monitor-foam to monitor GENI OpenFlow resources.  See [wiki:PlasticSlices/MonitoringRecommendations/FoamConfiguration] for documentation of how to install monitoring of FOAM.