Changes between Version 12 and Version 13 of PlasticSlices/MonitoringRecommendations/MyplcConfiguration
- Timestamp:
- 05/04/12 20:17:10 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PlasticSlices/MonitoringRecommendations/MyplcConfiguration
v12 v13 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 plastic-slices-monitor-myplc-0.4 9 tango-monitor-myplc-0.5-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. … … 13 13 == Upgrading from version 0.3 == 14 14 15 If you are currently running `plastic-slices-monitor-myplc-0.3`, you need only do the following steps of this upgrade: 16 * [#II.Installthemonitoringsoftware II. Install the monitoring software itself and the latest version of GMOC measurement_sender] 17 * [#V.Testthescript V. Test the new script and make sure it still works] 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. 18 19 19 If you are installing `plastic-slices-monitor-myplc` for the first time or upgrading from an earlier version, read all sections to see which steps you need to take. 20 20 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. 21 21 22 22 == Variables == … … 47 47 Do all of these steps every time you install or upgrade the monitoring software. 48 48 49 1. Download the ` plastic-slices-monitor-myplc-0.4.tar.gz` tarball from [http://software.geni.net/local-sw/], and copy it onto your MyPLC host, e.g. into `~/plastic-slices-monitor-myplc-0.4.tar.gz`.49 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`. 50 50 51 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 MyPLC host, e.g. into `~/measurement_sender.pl` 52 53 3. Unpack the tarball in `~`, and copy the files into place: 51 2. Use yum localinstall to install the RPM and any necessary dependencies: 54 52 {{{ 55 cd ~ 56 tar xvzf ~/plastic-slices-monitor-myplc-0.4.tar.gz 57 cd plastic-slices-monitor-myplc-0.4 58 sudo mkdir -p /usr/local/{bin,lib} 59 sudo cp bin/{build_gmoc_conf,metric_plc,report_data_to_gmoc} /usr/local/bin 60 sudo cp lib/rrd_metric.py /usr/local/lib 61 sudo chmod 555 /usr/local/bin/{build_gmoc_conf,metric_plc,report_data_to_gmoc} 62 sudo chmod 444 /usr/local/lib/rrd_metric.py 53 sudo yum localinstall ~/tango-monitor-myplc-0.5-1.noarch.rpm 63 54 }}} 64 55 65 4. Copy `measurement_sender` into place: 66 {{{ 67 sudo cp ~/measurement_sender.pl /usr/local/bin/measurement_sender 68 sudo chmod 555 /usr/local/bin/measurement_sender 69 }}} 70 71 === III. Install software dependencies === 72 73 When installing or upgrading, make sure you have all current software dependencies installed on the system: 74 {{{ 75 sudo yum install rrdtool-python rrdtool-perl perl-File-Find-Rule perl-XML-Writer perl-libwww-perl perl-Crypt-SSLeay 76 }}} 77 The monitoring scripts use these packages to: 78 * Manage RRD files 79 * Write the XML-based API format for the GMOC database 80 * Send the formatted data to GMOC via HTTPS 81 82 === IV. Create required directories and files === 56 === III. Create required directories and files === 83 57 84 58 These steps only need to be done the first time you install the monitoring software. … … 97 71 }}} 98 72 99 === V. Test the script ===73 === IV. Test the script === 100 74 101 75 Run the monitoring and submission scripts by hand to make sure they work. … … 105 79 2. Run the metric-gathering script by hand to make sure it works: 106 80 {{{ 107 sudo -u <cronuser> /usr/ local/bin/metric_plc81 sudo -u <cronuser> /usr/bin/metric_plc 108 82 }}} 109 83 * This should produce no output … … 112 86 3. Run the data reporting script by hand to make sure it works: 113 87 {{{ 114 sudo -u <cronuser> /usr/ local/bin/report_data_to_gmoc <site> <fqdn>88 sudo -u <cronuser> /usr/bin/report_data_to_gmoc <site> <fqdn> 115 89 }}} 116 90 * This should produce no output 117 91 * 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>`. 118 92 119 === V I. Install the scripts to run from cron ===93 === V. Install the scripts to run from cron === 120 94 121 95 This only needs to be done the first time you install the monitoring software. … … 127 101 and add the new lines: 128 102 {{{ 129 */1 * * * * /usr/ local/bin/metric_plc130 */5 * * * * /usr/ local/bin/report_data_to_gmoc <site> <fqdn>103 */1 * * * * /usr/bin/metric_plc 104 */5 * * * * /usr/bin/report_data_to_gmoc <site> <fqdn> 131 105 }}} 132 106