Changes between Initial Version and Version 1 of PlasticSlices/MonitoringRecommendations/PlnodeConfiguration


Ignore:
Timestamp:
05/04/11 23:06:19 (13 years ago)
Author:
chaos@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PlasticSlices/MonitoringRecommendations/PlnodeConfiguration

    v1 v1  
     1[[PageOutline]]
     2
     3= How to configure Plastic Slices monitoring on a MyPLC PlanetLab node =
     4
     5== Introduction ==
     6
     7This page explains how to configure a MyPLC !PlanetLab node for the [wiki:PlasticSlices/MonitoringRecommendations Plastic Slices central monitoring configuration].  Before following these instructions, please ask GPO infra for a copy of the tarball
     8{{{
     9plastic-slices-monitor-plnode-0.1.tar.gz
     10}}}
     11which is the latest version of the monitoring utilities for a MyPLC !PlanetLab node running Fedora 8 or Fedora 12.
     12
     13== Variables ==
     14
     15 * `<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.
     16 * `<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.''
     17
     18The 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.
     19
     20== Steps ==
     21
     22 1. Copy the tarball over to your node, e.g. into `~/plastic-slices-monitor-plnode-0.1.tar.gz`.
     23
     24 2. Unpack the tarball in `/`:
     25{{{
     26cd /
     27sudo tar xvzf ~/plastic-slices-monitor-plnode-0.1.tar.gz
     28}}}
     29 This should create the following files:
     30{{{
     31/usr/local/bin/build_gmoc_conf
     32/usr/local/bin/measurement_sender
     33/usr/local/bin/metric_plnode
     34/usr/local/bin/report_data_to_gmoc
     35/usr/local/lib/metricscollector.py
     36/usr/local/lib/rrd_metric.py
     37}}}
     38
     39 3. Install required packages:
     40   * IF your nodes can run yum, simply install the dependencies:
     41{{{
     42sudo yum install rrdtool-python rrdtool-perl perl-File-Find-Rule perl-XML-Writer perl-libwww-perl
     43}}}
     44   * IF you followed [wiki:PlasticSlices/MonitoringRecommendations/PlnodeConfiguration] step 3 to download the RPMs, copy the `~/rpms` directory and its contents onto this node, then do:
     45{{{
     46cd ~/rpms
     47sudo rpm -iv *.rpm
     48}}}
     49   * 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.
     50
     51 4. Create required directories:
     52{{{
     53sudo mkdir -p /var/spool/rrds/$(uname -n)
     54sudo mkdir -p /var/spool/rrds/REPORT
     55}}}
     56
     57 5. 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:
     58{{{
     59cd /var/spool/rrds
     60sudo ln -s $(uname -n) <fqdn>
     61}}}
     62
     63 6. Run the metric-gathering script by hand to make sure it works:
     64{{{
     65sudo /usr/local/bin/ganglia_metric_plnode
     66}}}
     67 * This should produce no output
     68 * After this runs, a number of RRD files should be created in `/var/spool/rrds/$(uname -n)`
     69
     70 7. Run the data reporting script by hand to make sure it works:
     71{{{
     72sudo /usr/local/bin/report_data_to_gmoc <site> <fqdn>
     73}}}
     74 * This should produce no output
     75 * 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>`.
     76
     77 8. Add the two scripts to cron: modify the root crontab:
     78{{{
     79sudo crontab -e
     80}}}
     81 and add the new lines:
     82{{{
     83*/1 * * * * /usr/local/bin/ganglia_metric_plnode
     84*/5 * * * * /usr/local/bin/report_data_to_gmoc <site> <fqdn>
     85}}}