Changes between Version 7 and Version 8 of PlasticSlices/MonitoringRecommendations/PlnodeConfiguration
- Timestamp:
- 07/08/11 12:37:13 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PlasticSlices/MonitoringRecommendations/PlnodeConfiguration
v7 v8 5 5 == Introduction == 6 6 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 tarball7 This page explains how to configure a MyPLC !PlanetLab node for the [ggw:PlasticSlices/MonitoringRecommendations Plastic Slices central monitoring configuration]. This page was written for 8 8 {{{ 9 plastic-slices-monitor-plnode-0. 2.tar.gz9 plastic-slices-monitor-plnode-0.3 10 10 }}} 11 11 which is the latest version of the monitoring utilities for a MyPLC !PlanetLab node running Fedora 8 or Fedora 12. … … 14 14 15 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 s tep 5below.''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.'' 17 17 18 18 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. 19 19 20 == Steps ==20 == Steps to configure MyPLC PlanetLab node monitoring == 21 21 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 === 23 23 24 2. Unpack the tarball in `/`: 24 You 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 25 29 {{{ 26 cd / 27 sudo tar xvzf ~/plastic-slices-monitor-plnode-0.2.tar.gz 30 sudo touch /usr/local/etc/monitoring_passwd 31 sudo chmod 600 /usr/local/etc/monitoring_passwd 32 sudo vi /usr/local/etc/monitoring_passwd 28 33 }}} 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: 30 43 {{{ 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 44 cd ~ 45 tar xvzf ~/plastic-slices-monitor-plnode-0.3.tar.gz 46 cd plastic-slices-monitor-plnode-0.3 47 sudo mkdir -p /usr/local/{bin,lib} 48 sudo cp bin/{build_gmoc_conf,metric_plnode,report_data_to_gmoc} /usr/local/bin 49 sudo cp lib/{metricscollector.py,rrd_metric.py} /usr/local/lib 50 sudo chmod 555 /usr/local/bin/{build_gmoc_conf,metric_plnode,report_data_to_gmoc} 51 sudo chmod 444 /usr/local/lib/{metricscollector.py,rrd_metric.py} 37 52 }}} 38 53 39 3. Install required packages: 40 * IF your nodes can run yum, simply install the dependencies: 54 4. Copy `measurement_sender` into place: 41 55 {{{ 42 sudo yum install rrdtool-python rrdtool-perl perl-File-Find-Rule perl-XML-Writer perl-libwww-perl 56 sudo cp ~/measurement_sender.pl /usr/local/bin/measurement_sender 57 sudo chmod 555 /usr/local/bin/measurement_sender 43 58 }}} 44 * IF this doesn't work for you, see [wiki:GpoLab/MyplcPackageInstallationTips#Debuggingmonitoringdependencies] for some other suggestions which might work.45 59 46 4. Create required directories: 60 === III. Install software dependencies === 61 62 When 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 {{{ 66 sudo 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 73 These steps only need to be done the first time you install the monitoring software. 74 75 1. Create required directories: 47 76 {{{ 48 77 sudo mkdir -p /var/spool/rrds/$(uname -n) … … 50 79 }}} 51 80 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: 53 82 {{{ 54 83 cd /var/spool/rrds … … 56 85 }}} 57 86 58 6. Run the metric-gathering script by hand to make sure it works: 87 === V. Test the script === 88 89 Run 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: 59 94 {{{ 60 95 sudo /usr/local/bin/metric_plnode 61 96 }}} 62 * This should produce no output63 * 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_` 65 100 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: 67 102 {{{ 68 103 sudo /usr/local/bin/report_data_to_gmoc <site> <fqdn> 69 104 }}} 70 * This should produce no output71 * 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 newentry 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>`. 72 107 73 8. Add the two scripts to cron: modify the root crontab: 108 === VI. Install the scripts to run from cron === 109 110 This only needs to be done the first time you install the monitoring software. 111 112 Add the two scripts to cron: modify the root crontab: 74 113 {{{ 75 114 sudo crontab -e 76 115 }}} 77 116 and add the new lines: 78 117 {{{ 79 118 */1 * * * * /usr/local/bin/metric_plnode 80 119 */5 * * * * /usr/local/bin/report_data_to_gmoc <site> <fqdn> 81 120 }}} 121