wiki:TangoGeniMonitoring/FoamConfiguration

Version 11 (modified by chaos@bbn.com, 11 years ago) (diff)

--

How to configure tango-monitor-foam to implement GMOC reporting on a FOAM aggregate

Introduction

This page explains how to configure an OpenFlow FOAM server for shared GENI operational monitoring. This page was written for

tango-monitor-foam_0.5.4-1

and 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.

Upgrading from previous versions

Upgrading from 0.5.x

If you are running tango-monitor-foam-0.5.x already, you need only upgrade the software and test in order to run 0.5.4. Do the following steps of this update:

Upgrading from 0.4.x

Version 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:

If you are installing tango-monitor-foam for the first time, read all sections to see which steps you need to take.

Variables

  • <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.)

Steps to configure FOAM monitoring

I. Install tango-monitor-gmoc

Follow the steps at TangoGeniMonitoring/GmocConfiguration to install and configure the generic GMOC monitoring client tango-monitor-gmoc.

Before you move on to the next step, make sure tango-monitor-gmoc is installed, and is at version 1.2.12 or higher. Check this using:

  • Ubuntu:
    dpkg -l tango-monitor-gmoc
    
  • CentOS:
    rpm -q tango-monitor-gmoc
    

If you don't have tango-monitor-gmoc, go to TangoGeniMonitoring/GmocConfiguration for the install instructions.

II. Install the monitoring software

Do these steps every time you install or upgrade the monitoring software.

If you are installing on Ubuntu

  1. Download the tango-monitor-foam_0.5.4-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.4-1_all.deb.
  1. 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:
    sudo dpkg -i ~/tango-monitor-foam_0.5.4-1_all.deb
    sudo apt-get -f install
    

If you are installing on CentOS

  1. Download the tango-monitor-foam-0.5.4-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.4-1.noarch.rpm.
  1. Use yum localinstall to install the local package. This will install the provided file, using your standard yum repositories to find any dependencies:
    sudo yum --nogpgcheck localinstall ~/tango-monitor-foam-0.5.4-1.noarch.rpm
    

III. Create required directories and files

These steps needs to be done only the first time you install tango-monitor-foam.

  1. Create required directories for caching flowvisor state:
    sudo mkdir -p /var/cache/fvmetrics/monitoring
    sudo chown <cronuser> /var/cache/fvmetrics/monitoring
    
  1. The metric_foam script requires a FOAM password file, which it expects to find in:
    /etc/foam.passwd
    
    This file should contain the admin password for FOAM. (This is the password you use with foamctl to run FOAM commands.)
    • If you wish to store your FOAM password in a different file, edit the GMOC monitoring config file:
      /usr/local/etc/gmoc_monitoring.conf
      
      and add a line:
      FOAM_PASSWD_FILE=<absolute path to your FOAM password file>
      

IV. Test the script

Run the monitoring and submission scripts by hand to make sure they work.

  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.
  1. Run the metric gathering script by hand to make sure it works:
    sudo -u <cronuser> /usr/bin/metric_foam
    
    • This should produce no output
    • After this runs, a number of RRD files should be created in /var/spool/rrds/metrics
  1. Run the data reporting script by hand to make sure it works:
    sudo -u <cronuser> /usr/bin/report_data_to_gmoc
    

V. Install the scripts to run from cron

This only needs to be done the first time you install the monitoring software.

Add the two scripts to cron: modify the <cronuser> crontab:

sudo -u <cronuser> crontab -e

and add the new lines:

*/1 * * * * /usr/bin/metric_foam
*/5 * * * * /usr/bin/report_data_to_gmoc

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.