Changes between Version 15 and Version 16 of PlasticSlices/MonitoringRecommendations/MyplcConfiguration


Ignore:
Timestamp:
06/14/12 16:32:57 (7 years ago)
Author:
chaos@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PlasticSlices/MonitoringRecommendations/MyplcConfiguration

    v15 v16  
    77This page explains how to configure a MyPLC server for the [wiki:PlasticSlices/MonitoringRecommendations Plastic Slices central monitoring configuration].  This page was written for
    88{{{
    9 tango-monitor-myplc-0.5-1
     9tango-monitor-myplc-0.6-1
    1010}}}
    1111which is the latest version of the monitoring utilities for a MyPLC server running Fedora 8 or Fedora 12.  It may not work well with older versions.
    1212
    13 == Upgrading from version 0.3 or later ==
     13== Upgrading from an earlier version ==
    1414
    15 If you are currently running `plastic-slices-monitor-myplc-0.3` or later, you need to do the following steps of this upgrade:
    16  * [#II.Installthemonitoringsoftware II. Install the monitoring software itself]
    17  * [#IV.Testthescript IV. Test the new script and make sure it still works]
    18  * [#V.Installthescriptstorunfromcron V. Install the scripts to run from cron]: the script paths have changed, so you will need to update your crontab.
     15Version 0.6 of tango-monitor-myplc introduces a new dependency and a config file.  If you are currently running version 0.5 of `tango-monitor-myplc`, you need to do the following steps of this update:
     16
     17 * [#II.Installsoftwaredependencies II. Install software dependencies]
     18 * [#III.Installthemonitoringsoftware III. Upgrade the monitoring software itself]
     19 * [#IV.Createrequireddirectoriesandfiles IV. Create required directories and files: Step 1 (add a config file for monitoring)]
     20 * [#V.Testthescript V. Test the new script and make sure it still works]
    1921
    2022If you are installing `tango-monitor-myplc` for the first time or upgrading from an earlier version, read all sections to see which steps you need to take.
     
    2426 * `<cronuser>`: The user as which to run the monitoring on MyPLC.  The scripts can run as root, or as a non-root user of your choice.  (At GPO, we use the `ganglia` user.)
    2527 * `<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.
    26  * `<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.''
     28 * `<fqdn>`: The fully-qualified domain name as which your MyPLC should report data.
    2729
    2830== Steps to configure MyPLC monitoring ==
     
    4547 3. Register site credentials: IF you have not yet registered your site to submit data to GMOC, follow the instructions at [wiki:GENIMetaOps/SiteCredentials].
    4648
    47 === II. Install the monitoring software ===
     49=== II. Install software dependencies ===
     50
     51Install `GMOC::ExchangeAPI-0.0.2` by hand (packaged versions of this module are coming soon).
     52
     53 1. Download the tarball onto the node (e.g. into your home directory):
     54{{{
     55wget http://gmoc-db.grnoc.iu.edu/sources/perl-libs/GMOC-ExchangeAPI-0.0.2.tar.gz
     56}}}
     57 2. Unpack the module into `/usr/local/lib`:
     58{{{
     59cd /usr/local/lib
     60sudo /bin/tar xvzf ~/GMOC-ExchangeAPI-0.0.2.tar.gz GMOC-ExchangeAPI-0.0.2/lib/GMOC --strip-components=2
     61}}}
     62 3. Verify that this created and populated `/usr/local/lib/GMOC`:
     63{{{
     64ls /usr/local/lib/GMOC
     65}}}
     66
     67=== III. Install the monitoring software ===
    4868
    4969Do all of these steps every time you install or upgrade the monitoring software.
    5070
    51  1. Download the `tango-monitor-myplc-0.5-1.noarch.rpm` file from [http://software.geni.net/local-sw/], and copy it onto your MyPLC host, e.g. into `~/tango-monitor-myplc-0.5-1.noarch.rpm`.
     71 1. Download the `tango-monitor-myplc-0.6-1.noarch.rpm` file from [http://software.geni.net/local-sw/], and copy it onto your MyPLC host, e.g. into `~/tango-monitor-myplc-0.6-1.noarch.rpm`.
    5272
    5373 2. Use yum localinstall to install the RPM and any necessary dependencies:
    5474{{{
    55 sudo yum localinstall ~/tango-monitor-myplc-0.5-1.noarch.rpm
     75sudo yum localinstall ~/tango-monitor-myplc-0.6-1.noarch.rpm
    5676}}}
    5777
    58 === III. Create required directories and files ===
     78=== IV. Create required directories and files ===
    5979
    60 These steps only need to be done the first time you install the monitoring software.
     80Step 1 needs to be done when you upgrade to `tango-monitor-foam-0.6`.  The other steps only need to be done the first time you install the monitoring software.
    6181 
    62  1. Create required directories:
     82 1. Populate the gmoc_monitoring configuration file:
     83   * Create the config file (the file does not contain sensitive information, and may safely be left world-readable):
    6384{{{
    64 sudo mkdir -p /var/spool/rrds/$(uname -n)
     85/usr/local/etc/gmoc_monitoring.conf
     86}}}
     87   * 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)'':
     88{{{
     89$ cat /usr/local/etc/gmoc_monitoring.conf
     90
     91# GMOC short name which is your username for authenticated monitoring data submission
     92SITENAME=<site>
     93
     94# GMOC short name of organization which manages your aggregate (may be the same as SITENAME)
     95ORGNAME=<site>
     96
     97# GMOC short name of "POP"/lab where your aggregate is located (may be the same as SITENAME)
     98POPNAME=<site>
     99
     100# Fully-qualified domain name of your host (Note: if your MyPLC's
     101# primary site is configured with an FQDN within PLC, that value will
     102# override this one.  If you're not sure, it is harmless to set this.)
     103HOSTNAME=<fqdn>
     104}}}
     105
     106 2. Create required directories:
     107{{{
    65108sudo mkdir -p /var/spool/rrds/REPORT
    66109sudo chown -R <cronuser> /var/spool/rrds
    67110}}}
    68111
    69  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:
    70 {{{
    71 cd /var/spool/rrds
    72 sudo ln -s $(uname -n) <fqdn>
    73 }}}
    74 
    75 === IV. Test the script ===
     112=== V. Test the script ===
    76113
    77114Run the monitoring and submission scripts by hand to make sure they work.
     
    84121}}}
    85122   * This should produce no output
    86    * After this runs, a number of RRD files should be created in `/var/spool/rrds/$(uname -n)`
     123   * After this runs, a number of RRD files should be created in `/var/spool/rrds/metrics`
    87124
    88125 3. Run the data reporting script by hand to make sure it works:
    89126{{{
    90 sudo -u <cronuser> /usr/bin/report_data_to_gmoc <site> <fqdn>
     127sudo -u <cronuser> /usr/bin/report_data_to_gmoc
    91128}}}
    92129   * This should produce no output
    93    * 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>`.
     130   * 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 your aggregate.
    94131
    95132=== V. Install the scripts to run from cron ===
     
    104141{{{
    105142*/1 * * * * /usr/bin/metric_plc
    106 */5 * * * * /usr/bin/report_data_to_gmoc <site> <fqdn>
     143*/5 * * * * /usr/bin/report_data_to_gmoc
    107144}}}
    108145