Version 4 (modified by 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 ofuname -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
- Copy the tarball over to your node, e.g. into
~/plastic-slices-monitor-plnode-0.1.tar.gz
.
- 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
- 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 you used yumdownloader to cache the RPMs on your MyPLC, copy them over now, install them by hand, and check that it worked:
cd ~/rpms sudo rpm -iv *.rpm rpm -q rrdtool-python rrdtool-perl perl-File-Find-Rule perl-XML-Writer perl-libwww-perl
Note that these RPMs were collected on a different machine, so there may still be dependency problems you need to resolve by hand. - IF neither of those situations applies, you will need to download RPMs and install dependencies by hand in order to install these packages. Please contact the GPO if you need a hand.
- IF your nodes can run yum, simply install the dependencies:
- Create required directories:
sudo mkdir -p /var/spool/rrds/$(uname -n) sudo mkdir -p /var/spool/rrds/REPORT
- 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>
- 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, a number of RRD files should be created in
/var/spool/rrds/$(uname -n)
- Run the data reporting script by hand to make sure it works:
sudo /usr/local/bin/report_data_to_gmoc <site> <fqdn>
- This should produce no output
- You should be able to browse to http://gmoc-dev.grnoc.iu.edu/api-demo/data/, view data by Location, select your site, and find a new entry for
<fqdn>
.
- 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>