Changes between Version 11 and Version 12 of PlasticSlices/MonitoringRecommendations/FlowvisorConfiguration
- Timestamp:
- 07/08/11 12:38:31 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PlasticSlices/MonitoringRecommendations/FlowvisorConfiguration
v11 v12 5 5 == Introduction == 6 6 7 This page explains how to configure an !OpenFlow !FlowVisor 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 an !OpenFlow !FlowVisor node for the [wiki:PlasticSlices/MonitoringRecommendations Plastic Slices central monitoring configuration]. This page was written for 8 8 {{{ 9 plastic-slices-monitor-flowvisor-0. 4.tar.gz9 plastic-slices-monitor-flowvisor-0.6 10 10 }}} 11 which is the latest version of the monitoring utilities for a !FlowVisor. We have tested the !FlowVisor utilities on Ubuntu 10.04 only. If you are running a different OS and it is not obvious how to translate the instructions, please contact GPO infra.11 and may not work well with earlier versions. We have tested the !FlowVisor utilities on Ubuntu 10.04 only. If you are running a different OS and it is not obvious how to translate the instructions, please contact GPO infra. 12 12 13 13 == Variables == … … 15 15 * `<cronuser>`: The user as which to run the FV monitoring. The scripts can run as root, or as a non-root user of your choice. (At GPO, we use the `ganglia` user.) 16 16 * `<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. 17 * `<fqdn>`: The fully-qualified domain name as which your FV should report data. ''IF this is not the same as the output of `uname -n` on your node, pay attention to s tep 5below.''17 * `<fqdn>`: The fully-qualified domain name as which your FV should report data. ''IF this is not the same as the output of `uname -n` on your node, pay attention to section IV below.'' 18 18 19 == Steps ==19 == Steps to configure FlowVisor monitoring == 20 20 21 1. Copy the tarball over to your FV host, e.g. into `~/plastic-slices-monitor-flowvisor-0.4.tar.gz`. 21 === I. Prepare to submit authenticated monitoring data to GMOC === 22 22 23 2. Unpack the tarball in `/`: 23 You need to do these steps if you are installing monitoring for the first time, or if you are upgrading from version 0.5 or previous. 24 25 1. Register site credentials: IF you have not yet registered your site to submit data to GMOC, follow the instructions at [wiki: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.''' 26 27 2. Store your site password in a file which !FlowVisor monitoring can use: 24 28 {{{ 25 cd / 26 sudo tar xvzf ~/plastic-slices-monitor-flowvisor-0.4.tar.gz 29 sudo touch /usr/local/etc/monitoring_passwd 30 sudo chown <cronuser> /usr/local/etc/monitoring_passwd 31 sudo chmod 600 /usr/local/etc/monitoring_passwd 32 sudo vi /usr/local/etc/monitoring_passwd 27 33 }}} 28 This should create the following files: 34 Add exactly one line to this file, containing the site monitoring password you registered with GMOC. 35 36 === II. Install the monitoring software === 37 38 Do all of these steps every time you install or upgrade the monitoring software. 39 40 1. Download the `plastic-slices-monitor-flowvisor-0.6.tar.gz` tarball from [http://software.geni.net/local-sw/], and copy it onto your FV host, e.g. into `~/plastic-slices-monitor-flowvisor-0.6.tar.gz`. 41 42 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 FV host, e.g. into `~/measurement_sender.pl` 43 44 3. Unpack the tarball in `~`, and copy the files into place: 29 45 {{{ 30 /usr/local/bin/build_gmoc_conf 31 /usr/local/bin/measurement_sender 32 /usr/local/bin/metric_flowvisor 33 /usr/local/bin/report_data_to_gmoc 34 /usr/local/lib/flowvisor_metrics.py 35 /usr/local/lib/rrd_metric.py 46 cd ~ 47 tar xvzf ~/plastic-slices-monitor-flowvisor-0.6.tar.gz 48 cd plastic-slices-monitor-flowvisor-0.6 49 sudo mkdir -p /usr/local/{bin,lib} 50 sudo cp bin/{build_gmoc_conf,metric_flowvisor,report_data_to_gmoc} /usr/local/bin 51 sudo cp lib/{flowvisor_metrics.py,rrd_metric.py} /usr/local/lib 52 sudo chmod 555 /usr/local/bin/{build_gmoc_conf,metric_flowvisor,report_data_to_gmoc} 53 sudo chmod 444 /usr/local/lib/{flowvisor_metrics.py,rrd_metric.py} 36 54 }}} 37 55 38 3. Install required packages:56 4. Copy `measurement_sender` into place: 39 57 {{{ 40 sudo apt-get install python-rrdtool librrds-perl libfile-find-rule-perl libwww-perl libxml-writer-perl 58 sudo cp ~/measurement_sender.pl /usr/local/bin/measurement_sender 59 sudo chmod 555 /usr/local/bin/measurement_sender 60 }}} 61 62 === III. Install software dependencies === 63 64 When installing or upgrading, make sure you have all current software dependencies installed on the system: 65 66 {{{ 67 sudo apt-get install python-rrdtool librrds-perl libfile-find-rule-perl libwww-perl libxml-writer-perl libcrypt-ssleay-perl 41 68 }}} 42 69 The monitoring scripts use these packages to: 43 70 * Manage RRD files 44 71 * Write the XML-based API format for the GMOC database 45 * Send the formatted data to GMOC via HTTP 72 * Send the formatted data to GMOC via HTTPS 73 74 === IV. Create required directories and files === 75 76 These steps only need to be done the first time you install the monitoring software. 46 77 47 4. Create required directories:78 1. Create required directories: 48 79 {{{ 49 80 sudo mkdir -p /var/cache/fvmetrics/monitoring … … 55 86 }}} 56 87 57 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:88 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: 58 89 {{{ 59 90 cd /var/spool/rrds … … 61 92 }}} 62 93 63 6. The `metric_flowvisor` script requires a flowvisor password file, which it expects to find in:94 3. The `metric_flowvisor` script requires a flowvisor password file, which it expects to find in: 64 95 {{{ 65 96 FVPASSWD_FILE = '/etc/flowvisor/fvpasswd' … … 67 98 This file should contain the password for the flowvisor root slice. (This is the password you use with command-line tools such as `fvctl` or `fvconfig` to configure a flowvisor, or which you entered in the "Setup !FlowVisor" dialog in the Expedient OIM when you setup your flowvisor.) 68 99 69 7. Check the time on your flowvisor host, 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. 100 === V. Test the script === 70 101 71 8. Run the metric gathering script by hand to make sure it works: 102 Run the monitoring and submission scripts by hand to make sure they work. 103 104 1. Check the time on your flowvisor host, 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. 105 106 2. Run the metric gathering script by hand to make sure it works: 72 107 {{{ 73 108 sudo -u <cronuser> /usr/local/bin/metric_flowvisor … … 76 111 * After this runs, a number of RRD files should be created in `/var/spool/rrds/$(uname -n)` 77 112 78 9. Run the data reporting script by hand to make sure it works:113 3. Run the data reporting script by hand to make sure it works: 79 114 {{{ 80 115 sudo -u <cronuser> /usr/local/bin/report_data_to_gmoc <site> <fqdn> 81 116 }}} 82 117 * This should produce no output 83 * 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 new entry for `<fqdn>`. 84 10. Add the two scripts to cron: modify the `<cronuser>` crontab: 118 * 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>`. 119 120 === VI. Install the scripts to run from cron === 121 122 This only needs to be done the first time you install the monitoring software. 123 124 Add the two scripts to cron: modify the `<cronuser>` crontab: 85 125 {{{ 86 126 sudo -u <cronuser> crontab -e 87 127 }}} 88 128 and add the new lines: 89 129 {{{ 90 130 */1 * * * * /usr/local/bin/metric_flowvisor