Changes between Initial Version and Version 1 of TangoGeniMonitoring/FoamConfiguration

02/04/13 19:29:54 (9 years ago)



  • TangoGeniMonitoring/FoamConfiguration

    v1 v1  
     3= How to configure tango-monitor-foam to implement GMOC reporting on a FOAM aggregate =
     5== Introduction ==
     7This page explains how to configure an !OpenFlow FOAM server for [wiki:TangoGeniMonitoring central GENI operational monitoring].  This page was written for
     11and 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.
     13== Upgrading from previous versions ==
     15Version 0.5 of tango-monitor-foam no longer includes, the python client which submits monitoring data to GMOC.  That file has been split into a separate package, tango-monitor-gmoc.  If you are currently running a previous version of tango-monitor-foam, you need to do the following steps of this update:
     16 * [#I.Installtangomonitorgmoc I. Install tango-monitor-gmoc]
     17 * [#II.Installthemonitoringsoftware II. Upgrade tango-monitor-foam itself]
     18 * [#III.Createrequireddirectoriesandfiles III. Create required directories and files (step 2: make sure you have a FOAM password file where tango-monitor-foam expects to find one]
     19 * [#IV.Testthescript IV. Test the new script and make sure it still works]
     21If you are installing `tango-monitor-foam` for the first time, read all sections to see which steps you need to take.
     23== Variables ==
     25 * `<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.)
     27== Steps to configure FOAM monitoring ==
     29=== I. Install tango-monitor-gmoc ===
     31Follow the steps at [wiki:TangoGeniMonitoring/GmocConfiguration] to install and configure the generic GMOC monitoring client `tango-monitor-gmoc`.  For best results, you should be running version:
     36=== II. Install the monitoring software ===
     38Do these steps every time you install or upgrade the monitoring software.
     40==== If you are installing on Ubuntu ====
     42 1. Download the `tango-monitor-foam_0.5.0-1.deb` package file from [], and copy it onto your FOAM host, e.g. into `~/tango-monitor-foam_0.5.0-1_all.deb`.
     44 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:
     46sudo dpkg -i ~/tango-monitor-foam_0.5.0-1_all.deb
     47sudo apt-get -f install
     50==== If you are installing on CentOS ====
     52 1. Download the `tango-monitor-foam-0.5.0-1.noarch.rpm` package file from [], and copy it onto your FOAM host, e.g. into `~/tango-monitor-foam-0.5.0-1.noarch.rpm`.
     54 2. Use yum localinstall to install the local package.  This will install the provided file, using your standard yum repositories to find any dependencies:
     56sudo yum --nogpgcheck localinstall ~/tango-monitor-foam-0.5.0-1.noarch.rpm
     59=== III. Create required directories and files ===
     61These steps needs to be done only the first time you install tango-monitor-foam.
     63 1. Create required directories for caching flowvisor state:
     65sudo mkdir -p /var/cache/fvmetrics/monitoring
     66sudo chown <cronuser> /var/cache/fvmetrics/monitoring
     69 2. The `metric_foam` script requires a FOAM password file, which it expects to find in:
     73 This file should contain the admin password for FOAM.  (This is the password you use with `foamctl` to run FOAM commands.)
     74   * ''If you wish to store your FOAM password in a different file'', edit the GMOC monitoring config file:
     78   and add a line:
     80FOAM_PASSWD_FILE=<absolute path to your FOAM password file>
     83=== IV. Test the script ===
     85Run the monitoring and submission scripts by hand to make sure they work.
     87 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.
     89 2. Run the metric gathering script by hand to make sure it works:
     91sudo -u <cronuser> /usr/bin/metric_foam
     93   * This should produce no output
     94   * After this runs, a number of RRD files should be created in `/var/spool/rrds/metrics`
     96 3. Run the data reporting script by hand to make sure it works:
     98sudo -u <cronuser> /usr/bin/report_data_to_gmoc
     100   * This should produce no output
     101   * You should be able to browse to [], view data by Location, select your site, and find an entry for your node.
     103=== V. Install the scripts to run from cron ===
     105This only needs to be done the first time you install the monitoring software.
     107Add the two scripts to cron: modify the `<cronuser>` crontab:
     109sudo -u <cronuser> crontab -e
     111and add the new lines:
     113*/1 * * * * /usr/bin/metric_foam
     114*/5 * * * * /usr/bin/report_data_to_gmoc
     116''N.B. If you have cron jobs already installed which contain parameters after these commands, you can update them or leave them as is.  The CLI parameters are now ignored.''