wiki:PlasticSlices/MonitoringRecommendations/PlnodeConfiguration

Version 6 (modified by chaos@bbn.com, 13 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. Before following these instructions, please ask GPO infra for a copy of the tarball

plastic-slices-monitor-plnode-0.1.tar.gz

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

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 step 5 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

  1. Copy the tarball over to your node, e.g. into ~/plastic-slices-monitor-plnode-0.1.tar.gz.
  1. Unpack the tarball in /:
    cd /
    sudo tar xvzf ~/plastic-slices-monitor-plnode-0.1.tar.gz
    
    This should create the following files:
    /usr/local/bin/build_gmoc_conf
    /usr/local/bin/measurement_sender
    /usr/local/bin/metric_plnode
    /usr/local/bin/report_data_to_gmoc
    /usr/local/lib/metricscollector.py
    /usr/local/lib/rrd_metric.py
    
  1. Install required packages:
    • IF your nodes can run yum, simply install the dependencies:
      sudo yum install rrdtool-python rrdtool-perl perl-File-Find-Rule perl-XML-Writer perl-libwww-perl
      
    • IF this doesn't work for you, see GpoLab/MyplcPackageInstallationTips for some other suggestions which might work.
  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>
    
  1. Run the metric-gathering script by hand to make sure it works:
    sudo /usr/local/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/local/bin/report_data_to_gmoc <site> <fqdn>
    
  1. Add the two scripts to cron: modify the root crontab:
    sudo crontab -e
    
    and add the new lines:
    */1 * * * * /usr/local/bin/metric_plnode
    */5 * * * * /usr/local/bin/report_data_to_gmoc <site> <fqdn>