Changes between Version 15 and Version 16 of PlasticSlices/MonitoringRecommendations/MyplcConfiguration
- Timestamp:
- 06/14/12 16:32:57 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PlasticSlices/MonitoringRecommendations/MyplcConfiguration
v15 v16 7 7 This page explains how to configure a MyPLC server for the [wiki:PlasticSlices/MonitoringRecommendations Plastic Slices central monitoring configuration]. This page was written for 8 8 {{{ 9 tango-monitor-myplc-0. 5-19 tango-monitor-myplc-0.6-1 10 10 }}} 11 11 which 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. 12 12 13 == Upgrading from version 0.3 or later==13 == Upgrading from an earlier version == 14 14 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. 15 Version 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] 19 21 20 22 If 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. … … 24 26 * `<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.) 25 27 * `<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. 27 29 28 30 == Steps to configure MyPLC monitoring == … … 45 47 3. Register site credentials: IF you have not yet registered your site to submit data to GMOC, follow the instructions at [wiki:GENIMetaOps/SiteCredentials]. 46 48 47 === II. Install the monitoring software === 49 === II. Install software dependencies === 50 51 Install `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 {{{ 55 wget 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 {{{ 59 cd /usr/local/lib 60 sudo /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 {{{ 64 ls /usr/local/lib/GMOC 65 }}} 66 67 === III. Install the monitoring software === 48 68 49 69 Do all of these steps every time you install or upgrade the monitoring software. 50 70 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`. 52 72 53 73 2. Use yum localinstall to install the RPM and any necessary dependencies: 54 74 {{{ 55 sudo yum localinstall ~/tango-monitor-myplc-0. 5-1.noarch.rpm75 sudo yum localinstall ~/tango-monitor-myplc-0.6-1.noarch.rpm 56 76 }}} 57 77 58 === I II. Create required directories and files ===78 === IV. Create required directories and files === 59 79 60 Thesesteps only need to be done the first time you install the monitoring software.80 Step 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. 61 81 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): 63 84 {{{ 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 92 SITENAME=<site> 93 94 # GMOC short name of organization which manages your aggregate (may be the same as SITENAME) 95 ORGNAME=<site> 96 97 # GMOC short name of "POP"/lab where your aggregate is located (may be the same as SITENAME) 98 POPNAME=<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.) 103 HOSTNAME=<fqdn> 104 }}} 105 106 2. Create required directories: 107 {{{ 65 108 sudo mkdir -p /var/spool/rrds/REPORT 66 109 sudo chown -R <cronuser> /var/spool/rrds 67 110 }}} 68 111 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 === 76 113 77 114 Run the monitoring and submission scripts by hand to make sure they work. … … 84 121 }}} 85 122 * 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` 87 124 88 125 3. Run the data reporting script by hand to make sure it works: 89 126 {{{ 90 sudo -u <cronuser> /usr/bin/report_data_to_gmoc <site> <fqdn>127 sudo -u <cronuser> /usr/bin/report_data_to_gmoc 91 128 }}} 92 129 * 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. 94 131 95 132 === V. Install the scripts to run from cron === … … 104 141 {{{ 105 142 */1 * * * * /usr/bin/metric_plc 106 */5 * * * * /usr/bin/report_data_to_gmoc <site> <fqdn>143 */5 * * * * /usr/bin/report_data_to_gmoc 107 144 }}} 108 145