Changes between Version 8 and Version 9 of PlasticSlices/MonitoringRecommendations/FoamConfiguration


Ignore:
Timestamp:
06/14/12 16:16:02 (12 years ago)
Author:
chaos@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PlasticSlices/MonitoringRecommendations/FoamConfiguration

    v8 v9  
    77This page explains how to configure an !OpenFlow FOAM server for [wiki:PlasticSlices/MonitoringRecommendations central GENI operational monitoring].  This page was written for
    88{{{
    9 tango-monitor-foam_0.2-3
     9tango-monitor-foam_0.3-1
    1010}}}
    1111and may not work well with earlier versions.  We have tested the FOAM utilities on Ubuntu 10.04 only, but expect they will also work on CentOS.  If you are running a different OS and it is not obvious how to translate the instructions, please contact GPO infra.
     
    1313== Upgrading from previous versions ==
    1414
    15 If you are currently running a previous version of `tango-monitor-foam`, you need only do the following steps of this update:
    16  * [#II.Installthemonitoringsoftware II. Upgrade the monitoring software itself]
    17  * [#IV.Testthescript IV. Test the new script and make sure it still works]
     15Version 0.3 of tango-monitor-foam introduces a new dependency and a config file.  If you are currently running a previous version of `tango-monitor-foam`, you need to do the following steps of this update:
     16 * [#II.Installsoftwaredependencies II. Install software dependencies]
     17 * [#III.Installthemonitoringsoftware III. Upgrade the monitoring software itself]
     18 * [#IV.Createrequireddirectoriesandfiles IV. Create required directories and files: Step 1 (add a config file for monitoring)]
     19 * [#V.Testthescript V. Test the new script and make sure it still works]
    1820
    1921If you are installing `tango-monitor-foam` for the first time or upgrading from an earlier version, read all sections to see which steps you need to take.
     
    2325 * `<cronuser>`: The user as which to run the FOAM monitoring.  The scripts can run as root, or as a non-root user of your choice.  (At GPO, we use the `ganglia` user.)
    2426 * `<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 III step 2 below.''
    2627
    2728== Steps to configure FOAM monitoring ==
     
    4445 3. Register site credentials: IF you have not yet registered your site to submit data to GMOC, follow the instructions at [wiki:GENIMetaOps/SiteCredentials].
    4546
    46 === II. Install the monitoring software ===
     47=== II. Install software dependencies ===
     48
     49=== III. Install the monitoring software ===
    4750
    4851Do these steps every time you install or upgrade the monitoring software.
     
    5053==== If you are installing on Ubuntu ====
    5154
    52  1. Download the `tango-monitor-foam_0.2-3.deb` package file from [http://software.geni.net/local-sw/], and copy it onto your FOAM host, e.g. into `~/tango-monitor-foam_0.2-3.deb`.
     55 1. Download the `tango-monitor-foam_0.3-1.deb` package file from [http://software.geni.net/local-sw/], and copy it onto your FOAM host, e.g. into `~/tango-monitor-foam_0.3-1.deb`.
    5356
    5457 2. Use dpkg to install the local package.  This may fail due to dependencies and say it is leaving the package "unconfigured".  Therefore, invoke apt-get to fix any missing dependencies:
    5558{{{
    56 sudo dpkg -i ~/tango-monitor-foam_0.2-3.deb
     59sudo dpkg -i ~/tango-monitor-foam_0.3-1.deb
    5760sudo apt-get -f install
    5861}}}
     
    6063==== If you are installing on CentOS ====
    6164
    62  1. Download the `tango-monitor-foam-0.2-3.noarch.rpm` package file from [http://software.geni.net/local-sw/], and copy it onto your FOAM host, e.g. into `~/tango-monitor-foam-0.2-3.noarch.rpm`.
     65 1. Download the `tango-monitor-foam-0.3-1.noarch.rpm` package file from [http://software.geni.net/local-sw/], and copy it onto your FOAM host, e.g. into `~/tango-monitor-foam-0.3-1.noarch.rpm`.
    6366
    6467 2. Use yum localinstall to install the local package.  This will install the provided file, using your standard yum repositories to find any dependencies:
    6568{{{
    66 sudo yum localinstall ~/tango-monitor-foam-0.2-3.noarch.rpm
     69sudo yum localinstall ~/tango-monitor-foam-0.3-1.noarch.rpm
    6770}}}
    6871
    69 === III. Create required directories and files ===
     72=== IV. Create required directories and files ===
    7073
    71 These steps only need to be done the first time you install the monitoring software.
     74Step 1 needs to be done when you upgrade to `tango-monitor-foam-0.3`.  The other steps only need to be done the first time you install the monitoring software.
     75
     76 1. Populate the gmoc_monitoring configuration file:
     77   * Create the config file (the file does not contain sensitive information, and may safely be left world-readable):
     78{{{
     79/usr/local/etc/gmoc_monitoring.conf
     80}}}
     81   * Edit the file and make sure it contains the variables `SITENAME`, `ORGNAME`, and `POPNAME`:
     82{{{
     83$ cat /usr/local/etc/gmoc_monitoring.conf
     84
     85# GMOC short name which is your username for authenticated monitoring data submission
     86SITENAME=<site>
     87
     88# GMOC short name of organization which manages your aggregate (may be the same as SITENAME)
     89ORGNAME=<site>
     90
     91# GMOC short name of "POP"/lab where your aggregate is located (may be the same as SITENAME)
     92POPNAME=<site>
     93}}}
    7294 
    73  1. Create required directories:
     95 2. Create required directories:
    7496{{{
    7597sudo mkdir -p /var/cache/fvmetrics/monitoring
    7698sudo chown <cronuser> /var/cache/fvmetrics/monitoring
    7799
    78 sudo mkdir -p /var/spool/rrds/$(uname -n)
    79100sudo mkdir -p /var/spool/rrds/REPORT
    80101sudo chown -R <cronuser> /var/spool/rrds
    81 }}}
    82 
    83  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:
    84 {{{
    85 cd /var/spool/rrds
    86 sudo ln -s $(uname -n) <fqdn>
    87102}}}
    88103
     
    93108 This file should contain the admin password for FOAM.  (This is the password you use with `foamctl` to run FOAM commands.)
    94109
    95 === IV. Test the script ===
     110=== V. Test the script ===
    96111
    97112Run the monitoring and submission scripts by hand to make sure they work.
     
    104119}}}
    105120   * This should produce no output
    106    * After this runs, a number of RRD files should be created in `/var/spool/rrds/$(uname -n)`
     121   * After this runs, a number of RRD files should be created in `/var/spool/rrds/metrics`
    107122
    108123 3. Run the data reporting script by hand to make sure it works:
    109124{{{
    110 sudo -u <cronuser> /usr/bin/report_data_to_gmoc <site> <fqdn>
     125sudo -u <cronuser> /usr/bin/report_data_to_gmoc
    111126}}}
    112127   * This should produce no output
    113    * 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>`.
     128   * 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 your node.
    114129
    115 === V. Install the scripts to run from cron ===
     130=== VI. Install the scripts to run from cron ===
    116131
    117132This only needs to be done the first time you install the monitoring software.
     
    124139{{{
    125140*/1 * * * * /usr/bin/metric_foam
    126 */5 * * * * /usr/bin/report_data_to_gmoc <site> <fqdn>
     141*/5 * * * * /usr/bin/report_data_to_gmoc
    127142}}}