Changes between Version 6 and Version 7 of PlasticSlices/MonitoringRecommendations/FlowvisorConfiguration
- Timestamp:
- 05/11/11 11:17:55 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PlasticSlices/MonitoringRecommendations/FlowvisorConfiguration
v6 v7 1 ''WARNING: The flowvisor monitoring code is currently under construction. Make sure gpo-infra knows you want a copy, and we'll get you one as soon as it is working again.''2 3 1 [[PageOutline]] 4 2 … … 9 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 tarball 10 8 {{{ 11 plastic-slices-monitor-flowvisor-0. 1.tar.gz9 plastic-slices-monitor-flowvisor-0.2.tar.gz 12 10 }}} 13 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. … … 15 13 == Variables == 16 14 17 * `< daemonuser>`: 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.)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.) 18 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. 19 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 step 5 below.'' … … 21 19 == Steps == 22 20 23 1. Copy the tarball over to your FV host, e.g. into `~/plastic-slices-monitor-flowvisor-0. 1.tar.gz`.21 1. Copy the tarball over to your FV host, e.g. into `~/plastic-slices-monitor-flowvisor-0.2.tar.gz`. 24 22 25 23 2. Unpack the tarball in `/`: 26 24 {{{ 27 25 cd / 28 sudo tar xvzf ~/plastic-slices-monitor-flowvisor-0. 1.tar.gz26 sudo tar xvzf ~/plastic-slices-monitor-flowvisor-0.2.tar.gz 29 27 }}} 30 28 This should create the following files: 31 29 {{{ 32 /etc/init.d/metric_flowvisor33 30 /usr/local/bin/build_gmoc_conf 34 31 /usr/local/bin/measurement_sender 35 32 /usr/local/bin/metric_flowvisor 36 33 /usr/local/bin/report_data_to_gmoc 34 /usr/local/lib/flowvisor_metrics.py 37 35 /usr/local/lib/rrd_metric.py 38 36 }}} … … 40 38 3. Install required packages: 41 39 {{{ 42 sudo apt-get install python-rrdtool python-daemonlibrrds-perl libfile-find-rule-perl libwww-perl libxml-writer-perl40 sudo apt-get install python-rrdtool librrds-perl libfile-find-rule-perl libwww-perl libxml-writer-perl 43 41 }}} 44 42 The monitoring scripts use these packages to: 45 * Daemonize metric collection in order to retain packet counter state46 43 * Manage RRD files 47 44 * Write the XML-based API format for the GMOC database … … 50 47 4. Create required directories: 51 48 {{{ 52 sudo mkdir /var/run/metrics53 sudo chown < daemonuser> /var/run/metrics49 sudo mkdir -p /var/cache/fvmetrics/monitoring 50 sudo chown <cronuser> /var/cache/fvmetrics/monitoring 54 51 55 52 sudo mkdir -p /var/spool/rrds/$(uname -n) 56 53 sudo mkdir -p /var/spool/rrds/REPORT 57 sudo chown -R < daemonuser> /var/spool/rrds54 sudo chown -R <cronuser> /var/spool/rrds 58 55 }}} 59 56 … … 64 61 }}} 65 62 66 6. The `metric_flowvisor` daemonrequires a flowvisor password file, which it expects to find in:63 6. The `metric_flowvisor` script requires a flowvisor password file, which it expects to find in: 67 64 {{{ 68 65 FVPASSWD_FILE = '/etc/flowvisor/fvpasswd' 69 66 }}} 70 Either create a file in this location containing only the flowvisor root password, or create a file in a different location containing the password, and modify `/usr/local/bin/metric_flowvisor` to look in the new location.67 Either create a file in this location containing only the flowvisor root password, or create a file in a different location containing the password, and modify `/usr/local/bin/metric_flowvisor` to set the correct value for `FVPASSWD_FILE`. 71 68 72 7. The `metric_flowvisor` service init script contains a variable indicating which username to use when running the metric daemon. 73 * Edit the file `/etc/init.d/metric_flowvisor` 74 * Near the top of that file, correct the METRIC_USER setting for your environment: 69 7. Run the metric gathering script by hand to make sure it works: 75 70 {{{ 76 METRIC_USER=<daemonuser> 71 sudo -u <cronuser> /usr/local/bin/metric_flowvisor 77 72 }}} 78 8. Start the metric-gathering service: 73 * This should produce no output 74 * After this runs, a number of RRD files should be created in `/var/spool/rrds/$(uname -n)` 75 76 8. Run the data reporting script by hand to make sure it works: 79 77 {{{ 80 sudo service metric_flowvisor start 81 }}} 82 * This should generate a PID file in: 83 {{{ 84 /var/run/metrics/flowvisor.pid 85 }}} 86 which should contain the PID of a running python-based process. 87 * Within two minutes or so, a number of RRD files should be created in `/var/spool/rrds/$(uname -n)` 88 89 9. Run the data reporting script by hand to make sure it works: 90 {{{ 91 sudo -u <daemonuser> /usr/local/bin/report_data_to_gmoc <site> <fqdn> 78 sudo -u <cronuser> /usr/local/bin/report_data_to_gmoc <site> <fqdn> 92 79 }}} 93 80 * This should produce no output 94 81 * 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>`. 95 82 96 10. Configure the metric-gathering service to start at boot:83 9. Add the two scripts to cron: modify the `<cronuser>` crontab: 97 84 {{{ 98 sudo update-rc.d metric_flowvisor defaults85 sudo -u <cronuser> crontab -e 99 86 }}} 100 11. Add the reporting script to cron: modify the `<daemonuser>` crontab:87 and add the new lines: 101 88 {{{ 102 sudo -u <daemonuser> crontab -e 103 }}} 104 and add the new line: 105 {{{ 89 */1 * * * * /usr/local/bin/metric_flowvisor 106 90 */5 * * * * /usr/local/bin/report_data_to_gmoc <site> <fqdn> 107 91 }}}