Changes between Version 7 and Version 8 of PlasticSlices/MonitoringRecommendations/PlnodeConfiguration


Ignore:
Timestamp:
07/08/11 12:37:13 (9 years ago)
Author:
chaos@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PlasticSlices/MonitoringRecommendations/PlnodeConfiguration

    v7 v8  
    55== Introduction ==
    66
    7 This 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
     7This page explains how to configure a MyPLC !PlanetLab node for the [ggw:PlasticSlices/MonitoringRecommendations Plastic Slices central monitoring configuration].  This page was written for
    88{{{
    9 plastic-slices-monitor-plnode-0.2.tar.gz
     9plastic-slices-monitor-plnode-0.3
    1010}}}
    1111which is the latest version of the monitoring utilities for a MyPLC !PlanetLab node running Fedora 8 or Fedora 12.
     
    1414
    1515 * `<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.''
     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 section IV below.''
    1717
    1818The 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.
    1919
    20 == Steps ==
     20== Steps to configure MyPLC PlanetLab node monitoring ==
    2121
    22  1. Copy the tarball over to your node, e.g. into `~/plastic-slices-monitor-plnode-0.2.tar.gz`.
     22=== I. Prepare to submit authenticated monitoring data to GMOC ===
    2323
    24  2. Unpack the tarball in `/`:
     24You 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.
     25
     26 1. Register site credentials: IF you have not yet registered your site to submit data to GMOC, follow the instructions at [ggw: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.'''
     27
     28 2. Store your site password in a file: create a file containing the
    2529{{{
    26 cd /
    27 sudo tar xvzf ~/plastic-slices-monitor-plnode-0.2.tar.gz
     30sudo touch /usr/local/etc/monitoring_passwd
     31sudo chmod 600 /usr/local/etc/monitoring_passwd
     32sudo vi /usr/local/etc/monitoring_passwd
    2833}}}
    29  This should create the following files:
     34 Add exactly one line to this file, containing the site monitoring password you registered with GMOC in step 1.
     35
     36=== II. Install the monitoring software ===
     37
     38 1. Download the `plastic-slices-monitor-plnode-0.3.tar.gz` tarball from [http://software.geni.net/local-sw/], and copy it onto your node, e.g. into `~/plastic-slices-monitor-plnode-0.3.tar.gz`.
     39
     40 2. Download the GMOC `measurement_sender.pl` script from [http://gmoc-db.grnoc.iu.edu/sources/measurement_api/measurement_sender.pl], and copy it onto your node, e.g. into `~/measurement_sender.pl`
     41
     42 3. Unpack the tarball in `~`, and copy the files into place:
    3043{{{
    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
     44cd ~
     45tar xvzf ~/plastic-slices-monitor-plnode-0.3.tar.gz
     46cd plastic-slices-monitor-plnode-0.3
     47sudo mkdir -p /usr/local/{bin,lib}
     48sudo cp bin/{build_gmoc_conf,metric_plnode,report_data_to_gmoc} /usr/local/bin
     49sudo cp lib/{metricscollector.py,rrd_metric.py} /usr/local/lib
     50sudo chmod 555 /usr/local/bin/{build_gmoc_conf,metric_plnode,report_data_to_gmoc}
     51sudo chmod 444 /usr/local/lib/{metricscollector.py,rrd_metric.py}
    3752}}}
    3853
    39  3. Install required packages:
    40    * IF your nodes can run yum, simply install the dependencies:
     54 4. Copy `measurement_sender` into place:
    4155{{{
    42 sudo yum install rrdtool-python rrdtool-perl perl-File-Find-Rule perl-XML-Writer perl-libwww-perl
     56sudo cp ~/measurement_sender.pl /usr/local/bin/measurement_sender
     57sudo chmod 555 /usr/local/bin/measurement_sender
    4358}}}
    44    * IF this doesn't work for you, see [wiki:GpoLab/MyplcPackageInstallationTips#Debuggingmonitoringdependencies] for some other suggestions which might work.
    4559
    46  4. Create required directories:
     60=== III. Install software dependencies ===
     61
     62When installing or upgrading, make sure you have all current software dependencies installed on the system:
     63
     64 * IF your nodes can run yum, simply install the dependencies:
     65{{{
     66sudo yum install rrdtool-python rrdtool-perl perl-File-Find-Rule perl-XML-Writer perl-libwww-perl perl-Crypt-SSLeay
     67}}}
     68
     69 * IF this doesn't work for you, see [ggw:GpoLab/MyplcPackageInstallationTips#Debuggingmonitoringdependencies] for some other suggestions which might work.
     70
     71=== IV. Create required directories and files ===
     72
     73These steps only need to be done the first time you install the monitoring software.
     74
     75 1. Create required directories:
    4776{{{
    4877sudo mkdir -p /var/spool/rrds/$(uname -n)
     
    5079}}}
    5180
    52  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:
     81 2. 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:
    5382{{{
    5483cd /var/spool/rrds
     
    5685}}}
    5786
    58  6. Run the metric-gathering script by hand to make sure it works:
     87=== V. Test the script ===
     88
     89Run the monitoring and submission scripts by hand to make sure they work.
     90
     91 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.
     92
     93 2. Run the metric-gathering script by hand to make sure it works:
    5994{{{
    6095sudo /usr/local/bin/metric_plnode
    6196}}}
    62  * This should produce no output
    63  * After this runs, at least one RRD file should be created in `/var/spool/rrds/$(uname -n)`
    64  * If you run the script a second time, it should start creating additional per-sliver RRDs whose filenames begin with `pl_sliver_`
     97   * This should produce no output
     98   * After this runs, at least one RRD file should be created in `/var/spool/rrds/$(uname -n)`
     99   * If you run the script a second time, it should start creating additional per-sliver RRDs whose filenames begin with `pl_sliver_`
    65100
    66  7. Run the data reporting script by hand to make sure it works:
     101 3. Run the data reporting script by hand to make sure it works:
    67102{{{
    68103sudo /usr/local/bin/report_data_to_gmoc <site> <fqdn>
    69104}}}
    70  * This should produce no output
    71  * 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>`.
     105   * This should produce no output
     106   * 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 an entry for `<fqdn>`.
    72107
    73  8. Add the two scripts to cron: modify the root crontab:
     108=== VI. Install the scripts to run from cron ===
     109
     110This only needs to be done the first time you install the monitoring software.
     111
     112Add the two scripts to cron: modify the root crontab:
    74113{{{
    75114sudo crontab -e
    76115}}}
    77  and add the new lines:
     116and add the new lines:
    78117{{{
    79118*/1 * * * * /usr/local/bin/metric_plnode
    80119*/5 * * * * /usr/local/bin/report_data_to_gmoc <site> <fqdn>
    81120}}}
     121