Changes between Initial Version and Version 1 of PlasticSlices/MonitoringRecommendations/FoamConfiguration


Ignore:
Timestamp:
04/30/12 10:27:39 (12 years ago)
Author:
chaos@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PlasticSlices/MonitoringRecommendations/FoamConfiguration

    v1 v1  
     1[[PageOutline]]
     2
     3= How to configure Plastic Slices monitoring on an OpenFlow FOAM AM =
     4
     5== Introduction ==
     6
     7This page explains how to configure an !OpenFlow FOAM server for [wiki:PlasticSlices/MonitoringRecommendations central GENI operational monitoring].  This page was written for
     8{{{
     9tango-monitor-foam_0.1-1
     10}}}
     11and may not work well with earlier versions.  We have tested the FOAM 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 previous versions ==
     14
     15If you are currently running a development snapshot of `tango-monitor-foam_0.1`, 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]
     18
     19If 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.
     20
     21== Variables ==
     22
     23 * `<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.)
     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 FOAM monitoring ==
     28
     29=== I. Prepare to submit authenticated monitoring data to GMOC ===
     30
     31You need to do these steps if you are installing monitoring for the first time.
     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 FOAM monitoring can use:
     36{{{
     37sudo touch /usr/local/etc/monitoring_passwd
     38sudo chown <cronuser> /usr/local/etc/monitoring_passwd
     39sudo chmod 600 /usr/local/etc/monitoring_passwd
     40sudo 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
     46Do these steps every time you install or upgrade the monitoring software.
     47
     48 1. Download the `tango-monitor-foam_0.1-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.1-1.deb`.
     49
     50 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:
     51{{{
     52sudo dpkg -i ~/tango-monitor-foam_0.1-1.deb
     53sudo apt-get -f install
     54}}}
     55
     56=== III. Create required directories and files ===
     57
     58These steps only need to be done the first time you install the monitoring software.
     59 
     60 1. Create required directories:
     61{{{
     62sudo mkdir -p /var/cache/fvmetrics/monitoring
     63sudo chown <cronuser> /var/cache/fvmetrics/monitoring
     64
     65sudo mkdir -p /var/spool/rrds/$(uname -n)
     66sudo mkdir -p /var/spool/rrds/REPORT
     67sudo chown -R <cronuser> /var/spool/rrds
     68}}}
     69
     70 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:
     71{{{
     72cd /var/spool/rrds
     73sudo ln -s $(uname -n) <fqdn>
     74}}}
     75
     76 3. The `metric_foam` script requires a FOAM password file, which it expects to find in:
     77{{{
     78/opt/foam/etc/foampasswd
     79}}}
     80 This file should contain the admin password for FOAM.  (This is the password you use with `foamctl` to run FOAM commands.)
     81
     82=== IV. Test the script ===
     83
     84Run the monitoring and submission scripts by hand to make sure they work.
     85
     86 1. Check the time on your FOAM host, and make sure it is accurate. The 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.
     87
     88 2. Run the metric gathering script by hand to make sure it works:
     89{{{
     90sudo -u <cronuser> /usr/bin/metric_foam
     91}}}
     92   * This should produce no output
     93   * After this runs, a number of RRD files should be created in `/var/spool/rrds/$(uname -n)`
     94
     95 3. Run the data reporting script by hand to make sure it works:
     96{{{
     97sudo -u <cronuser> /usr/bin/report_data_to_gmoc <site> <fqdn>
     98}}}
     99   * This should produce no output
     100   * 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>`.
     101
     102=== VI. Install the scripts to run from cron ===
     103
     104This only needs to be done the first time you install the monitoring software.
     105
     106Add the two scripts to cron: modify the `<cronuser>` crontab:
     107{{{
     108sudo -u <cronuser> crontab -e
     109}}}
     110and add the new lines:
     111{{{
     112*/1 * * * * /usr/bin/metric_foam
     113*/5 * * * * /usr/bin/report_data_to_gmoc <site> <fqdn>
     114}}}