Version 11 (modified by 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:
- II. Upgrade tango-monitor-foam itself
- III. Create required directories and files (step 2: make sure you have a FOAM password file where tango-monitor-foam expects to find one)
- IV. Test the new script and make sure it still works
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:
- I. Install tango-monitor-gmoc
- II. Upgrade tango-monitor-foam itself
- III. Create required directories and files (step 2: make sure you have a FOAM password file where tango-monitor-foam expects to find one)
- IV. Test the new script and make sure it still works
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 theganglia
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
- 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
.
- 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
- 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
.
- 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.
- Create required directories for caching flowvisor state:
sudo mkdir -p /var/cache/fvmetrics/monitoring sudo chown <cronuser> /var/cache/fvmetrics/monitoring
- 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 withfoamctl
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>
- If you wish to store your FOAM password in a different file, edit the GMOC monitoring config file:
IV. Test the script
Run the monitoring and submission scripts by hand to make sure they work.
- 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.
- 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
- Run the data reporting script by hand to make sure it works:
sudo -u <cronuser> /usr/bin/report_data_to_gmoc
- This should produce no output
- 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.
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.