wiki:PlasticSlices/MonitoringRecommendations/PlnodeConfiguration

Version 18 (modified by tupty@bbn.com, 12 years ago) (diff)

adding --nogpgcheck to yum localinstall per Russ's experience

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

Version 0.7 of tango-monitor-plnode introduces a config file. If you are currently running a previous version of tango-monitor-plnode, you need to do the following steps of this update:

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. IF you have not yet registered your site to submit data to GMOC, generate a password for automated monitoring data submission to use. 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:
    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 your site monitoring password.
  1. Register site credentials: IF you have not yet registered your site to submit data to GMOC, follow the instructions at GENIMetaOps/SiteCredentials.

II. Install the monitoring software

  1. Download tango-monitor-plnode-0.7-1.noarch.rpm from http://software.geni.net/local-sw/, and copy it onto your node, e.g. into ~/tango-monitor-plnode-0.7-1.noarch.rpm.
  1. Use yum localinstall to install the RPM and any necessary dependencies:
    sudo yum --nogpgcheck localinstall ~/tango-monitor-plnode-0.7-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

Step 1 needs to be done the first time you upgrade from tango-monitor-plnode-0.6 or earlier. All three steps need to be done the first time you install tango-monitor-plnode.

  1. Populate the gmoc_monitoring configuration file:
    • Create the config file (the file does not contain sensitive information, and may safely be left world-readable):
      /usr/local/etc/gmoc_monitoring.conf
      
    • Edit the file and make sure it contains the variables SITENAME, ORGNAME, and POPNAME. (N.B. If you are upgrading from a previous version, all three of these variables should contain the <site> value you used in the past):
      $ cat /usr/local/etc/gmoc_monitoring.conf
      
      # GMOC short name which is your username for authenticated monitoring data submission
      SITENAME=<site>
      
      # GMOC short name of organization which manages your aggregate (may be the same as SITENAME)
      ORGNAME=<site>
      
      # GMOC short name of "POP"/lab where your aggregate is located (may be the same as SITENAME)
      POPNAME=<site>
      
      # Fully qualified hostname of this plnode
      HOSTNAME=<fqdn>
      
  1. Create required directories:
    sudo mkdir -p /var/spool/rrds/REPORT
    

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
    

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