Changes between Initial Version and Version 1 of TangoGeniMonitoring/FoamConfiguration


Ignore:
Timestamp:
02/04/13 19:29:54 (11 years ago)
Author:
chaos@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TangoGeniMonitoring/FoamConfiguration

    v1 v1  
     1[[PageOutline]]
     2
     3= How to configure tango-monitor-foam to implement GMOC reporting on a FOAM aggregate =
     4
     5== Introduction ==
     6
     7This page explains how to configure an !OpenFlow FOAM server for [wiki:TangoGeniMonitoring central GENI operational monitoring].  This page was written for
     8{{{
     9tango-monitor-foam_0.5.0-1
     10}}}
     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.
     12
     13== Upgrading from previous versions ==
     14
     15Version 0.5 of tango-monitor-foam no longer includes gmoc.py, 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]
     20
     21If you are installing `tango-monitor-foam` for the first time, read all sections to see which steps you need to take.
     22
     23== Variables ==
     24
     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.)
     26
     27== Steps to configure FOAM monitoring ==
     28
     29=== I. Install tango-monitor-gmoc ===
     30
     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:
     32{{{
     33tango-monitor-gmoc_1.2.12-1
     34}}}
     35
     36=== II. Install the monitoring software ===
     37
     38Do these steps every time you install or upgrade the monitoring software.
     39
     40==== If you are installing on Ubuntu ====
     41
     42 1. Download the `tango-monitor-foam_0.5.0-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.5.0-1_all.deb`.
     43
     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:
     45{{{
     46sudo dpkg -i ~/tango-monitor-foam_0.5.0-1_all.deb
     47sudo apt-get -f install
     48}}}
     49
     50==== If you are installing on CentOS ====
     51
     52 1. Download the `tango-monitor-foam-0.5.0-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.5.0-1.noarch.rpm`.
     53
     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:
     55{{{
     56sudo yum --nogpgcheck localinstall ~/tango-monitor-foam-0.5.0-1.noarch.rpm
     57}}}
     58
     59=== III. Create required directories and files ===
     60
     61These steps needs to be done only the first time you install tango-monitor-foam.
     62
     63 1. Create required directories for caching flowvisor state:
     64{{{
     65sudo mkdir -p /var/cache/fvmetrics/monitoring
     66sudo chown <cronuser> /var/cache/fvmetrics/monitoring
     67}}}
     68
     69 2. The `metric_foam` script requires a FOAM password file, which it expects to find in:
     70{{{
     71/etc/foam.passwd
     72}}}
     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:
     75{{{
     76/usr/local/etc/gmoc_monitoring.conf
     77}}}
     78   and add a line:
     79{{{
     80FOAM_PASSWD_FILE=<absolute path to your FOAM password file>
     81}}}
     82
     83=== IV. Test the script ===
     84
     85Run the monitoring and submission scripts by hand to make sure they work.
     86
     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.
     88
     89 2. Run the metric gathering script by hand to make sure it works:
     90{{{
     91sudo -u <cronuser> /usr/bin/metric_foam
     92}}}
     93   * This should produce no output
     94   * After this runs, a number of RRD files should be created in `/var/spool/rrds/metrics`
     95
     96 3. Run the data reporting script by hand to make sure it works:
     97{{{
     98sudo -u <cronuser> /usr/bin/report_data_to_gmoc
     99}}}
     100   * This should produce no output
     101   * 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.
     102
     103=== V. Install the scripts to run from cron ===
     104
     105This only needs to be done the first time you install the monitoring software.
     106
     107Add the two scripts to cron: modify the `<cronuser>` crontab:
     108{{{
     109sudo -u <cronuser> crontab -e
     110}}}
     111and add the new lines:
     112{{{
     113*/1 * * * * /usr/bin/metric_foam
     114*/5 * * * * /usr/bin/report_data_to_gmoc
     115}}}
     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.''