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


Ignore:
Timestamp:
07/01/12 12:22:53 (12 years ago)
Author:
chaos@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PlasticSlices/MonitoringRecommendations/PgeniSharedConfiguration

    v1 v1  
     1[[PageOutline]]
     2
     3= How to configure Plastic Slices monitoring on a ProtoGENI shared node =
     4
     5== Introduction ==
     6
     7This page explains how to configure an OpenVZ-based ProtoGENI shared node for GMOC monitoring.  This page was written for
     8{{{
     9tango-monitor-pgenishared-0.1-0dev2
     10}}}
     11which is the latest version of the monitoring utilities for a ProtoGENI shared node running Fedora.
     12
     13== Variables ==
     14
     15 * `<gmoc_site>`: The sitename (monitoring submission username) under which this node is submitting data to GMOC.  (See step I for details)
     16 * `<gmoc_org>`: The organization name which manages this node, to be registered in GMOC's database
     17 * `<gmoc_pop>`: The POP (physical location) of this node, to be registered in GMOC's database
     18 * `<fqdn>`: The fully-qualified domain name using which your node should report data.
     19
     20The scripts must run as root on nodes, because they use OpenVZ tools to obtain node status.  This page assumes you will also do your reporting as root.
     21
     22== Steps to configure ProtoGENI shared node monitoring ==
     23
     24=== I. Prepare to submit authenticated monitoring data to GMOC ===
     25
     26You need to do this steps if you are installing monitoring for the first time at your site.
     27
     28 1. IF you have not yet registered your site to submit data to GMOC, generate a password for automated monitoring data submission to use.  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.'''
     29
     30 2. Store your site password in a file:
     31{{{
     32sudo touch /usr/local/etc/monitoring_passwd
     33sudo chmod 600 /usr/local/etc/monitoring_passwd
     34sudo vi /usr/local/etc/monitoring_passwd
     35}}}
     36 Add exactly one line to this file, containing your site monitoring password.
     37
     38 3. Register site credentials: IF you have not yet registered your site to submit data to GMOC, follow the instructions at [wiki:GENIMetaOps/SiteCredentials].
     39
     40=== II. Install the monitoring software ===
     41
     42 1. Download `tango-monitor-pgenishared-0.1-0dev2.noarch.rpm` from [http://software.geni.net/local-sw/], and copy it onto your node, e.g. into `~/tango-monitor-pgenishared-0.1-0dev2.noarch.rpm`.
     43
     44 2. Use yum localinstall to install the RPM and any necessary dependencies:
     45{{{
     46sudo yum --nogpgcheck localinstall ~/tango-monitor-pgenishared-0.1-0dev2.noarch.rpm
     47}}}
     48
     49=== III. Create required directories and files ===
     50
     51All three steps need to be done the first time you install tango-monitor-pgenishared.
     52
     53 1. Populate the gmoc_monitoring configuration file:
     54   * Create the config file (the file does not contain sensitive information, and may safely be left world-readable):
     55{{{
     56/usr/local/etc/gmoc_monitoring.conf
     57}}}
     58   * Edit the file and make sure it contains the variables `SITENAME`, `ORGNAME`, and `POPNAME`:
     59{{{
     60$ cat /usr/local/etc/gmoc_monitoring.conf
     61
     62# GMOC short name which is your username for authenticated monitoring data submission
     63SITENAME=<gmoc_site>
     64
     65# GMOC short name of organization which manages your aggregate (may be the same as SITENAME)
     66ORGNAME=<gmoc_org>
     67
     68# GMOC short name of "POP"/lab where your aggregate is located (may be the same as SITENAME)
     69POPNAME=<gmoc_pop>
     70
     71# Fully qualified hostname of this node
     72HOSTNAME=<fqdn>
     73}}}
     74
     75 2. Create required directories:
     76{{{
     77sudo mkdir -p /var/spool/rrds/REPORT
     78}}}
     79
     80=== IV. Test the script ===
     81
     82Run the monitoring and submission scripts by hand to make sure they work.
     83
     84 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.
     85
     86 2. Run the metric-gathering script by hand to make sure it works:
     87{{{
     88sudo /usr/bin/metric_pgenishared
     89}}}
     90   * This should produce no output
     91   * After this runs, at least one RRD file should be created in `/var/spool/rrds/metrics`
     92
     93 3. Run the data reporting script by hand to make sure it works:
     94{{{
     95sudo /usr/bin/report_data_to_gmoc
     96}}}
     97   * This should produce no output
     98   * You should be able to browse to [http://gmoc-db.grnoc.iu.edu/api-demo/], view data by Location, select your site, and find an entry for `<fqdn>`.
     99
     100=== VI. Install the scripts to run from cron ===
     101
     102This only needs to be done the first time you install the monitoring software.
     103
     104Add the two scripts to cron: modify the root crontab:
     105{{{
     106sudo crontab -e
     107}}}
     108and add the new lines:
     109{{{
     110*/1 * * * * /usr/bin/metric_pgenishared
     111*/5 * * * * /usr/bin/report_data_to_gmoc
     112}}}
     113
     114