wiki:PlasticSlices/MonitoringRecommendations/PlnodeConfiguration

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

--

How to configure Plastic Slices monitoring on a MyPLC PlanetLab node

Introduction

This page explains how to configure a MyPLC PlanetLab node for the Plastic Slices central monitoring configuration. This page was written for

tango-monitor-plnode-0.6-1

which is the latest version of the monitoring utilities for a MyPLC PlanetLab node running Fedora 8 or Fedora 12.

Upgrading from version 0.4 or later

If you are currently running plastic-slices-monitor-plnode-0.4 or later, you need only do the following steps of this upgrade:

If you are installing tango-monitor-plnode for the first time or upgrading from an earlier version, read all sections to see which steps you need to take.

Variables

  • <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.
  • <fqdn>: The fully-qualified domain name as which your MyPLC should report data. IF this is not the same as the output of uname -n on your node, pay attention to section IV below.

The scripts must run as root on nodes, because they use vserver-stat to obtain node status. This page assumes you will also do your reporting as root.

Steps to configure MyPLC PlanetLab node monitoring

I. Prepare to submit authenticated monitoring data to GMOC

You need to do these steps if you are installing monitoring for the first time, or if you are upgrading from version 0.2 or previous.

  1. Register site credentials: IF you have not yet registered your site to submit data to GMOC, follow the instructions at 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.
  1. Store your site password in a file: create a file containing the
    sudo touch /usr/local/etc/monitoring_passwd
    sudo chmod 600 /usr/local/etc/monitoring_passwd
    sudo vi /usr/local/etc/monitoring_passwd
    
    Add exactly one line to this file, containing the site monitoring password you registered with GMOC in step 1.

II. Install the monitoring software

  1. Download tango-monitor-plnode-0.6-1.noarch.rpm from http://software.geni.net/local-sw/, and copy it onto your node, e.g. into ~/tango-monitor-plnode-0.6-1.noarch.rpm.
  1. Use yum localinstall to install the RPM and any necessary dependencies:
    sudo yum localinstall ~/tango-monitor-plnode-0.6-1.noarch.rpm
    
    • IF this doesn't work for you because you do not have a working yum on your plnode and can't resolve package dependencies, see GpoLab/MyplcPackageInstallationTips for some other suggestions which might work.

III. Create required directories and files

These steps only need to be done the first time you install the monitoring software.

  1. Create required directories:
    sudo mkdir -p /var/spool/rrds/$(uname -n) 
    sudo mkdir -p /var/spool/rrds/REPORT
    
  1. 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:
    cd /var/spool/rrds
    sudo ln -s $(uname -n) <fqdn>
    

IV. Test the script

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

  1. Check the time on your node, and make sure it is accurate. The timeseries 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. MyPLC PlanetLab nodes should get a working NTP configuration automatically, but check to make sure it is working.
  1. Run the metric-gathering script by hand to make sure it works:
    sudo /usr/bin/metric_plnode
    
    • This should produce no output
    • After this runs, at least one RRD file should be created in /var/spool/rrds/$(uname -n)
    • If you run the script a second time, it should start creating additional per-sliver RRDs whose filenames begin with pl_sliver_
  1. Run the data reporting script by hand to make sure it works:
    sudo /usr/bin/report_data_to_gmoc <site> <fqdn>
    

VI. 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 root crontab:

sudo crontab -e

and add the new lines:

*/1 * * * * /usr/bin/metric_plnode
*/5 * * * * /usr/bin/report_data_to_gmoc <site> <fqdn>