wiki:PlasticSlices/MonitoringRecommendations/PgeniSharedConfiguration

Version 1 (modified by chaos@bbn.com, 7 years ago) (diff)

--

How to configure Plastic Slices monitoring on a ProtoGENI shared node

Introduction

This page explains how to configure an OpenVZ-based ProtoGENI shared node for GMOC monitoring. This page was written for

tango-monitor-pgenishared-0.1-0dev2

which is the latest version of the monitoring utilities for a ProtoGENI shared node running Fedora.

Variables

  • <gmoc_site>: The sitename (monitoring submission username) under which this node is submitting data to GMOC. (See step I for details)
  • <gmoc_org>: The organization name which manages this node, to be registered in GMOC's database
  • <gmoc_pop>: The POP (physical location) of this node, to be registered in GMOC's database
  • <fqdn>: The fully-qualified domain name using which your node should report data.

The scripts must run as root on nodes, because they use OpenVZ tools to obtain node status. This page assumes you will also do your reporting as root.

Steps to configure ProtoGENI shared node monitoring

I. Prepare to submit authenticated monitoring data to GMOC

You need to do this steps if you are installing monitoring for the first time at your site.

  1. IF you have not yet registered your site to submit data to GMOC, generate a password for automated monitoring data submission to use. 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.
  1. Store your site password in a file:
    sudo touch /usr/local/etc/monitoring_passwd
    sudo chmod 600 /usr/local/etc/monitoring_passwd
    sudo vi /usr/local/etc/monitoring_passwd
    
    Add exactly one line to this file, containing your site monitoring password.
  1. Register site credentials: IF you have not yet registered your site to submit data to GMOC, follow the instructions at GENIMetaOps/SiteCredentials.

II. Install the monitoring software

  1. Download tango-monitor-pgenishared-0.1-0dev2.noarch.rpm from http://software.geni.net/local-sw/, and copy it onto your node, e.g. into ~/tango-monitor-pgenishared-0.1-0dev2.noarch.rpm.
  1. Use yum localinstall to install the RPM and any necessary dependencies:
    sudo yum --nogpgcheck localinstall ~/tango-monitor-pgenishared-0.1-0dev2.noarch.rpm
    

III. Create required directories and files

All three steps need to be done the first time you install tango-monitor-pgenishared.

  1. Populate the gmoc_monitoring configuration file:
    • Create the config file (the file does not contain sensitive information, and may safely be left world-readable):
      /usr/local/etc/gmoc_monitoring.conf
      
    • Edit the file and make sure it contains the variables SITENAME, ORGNAME, and POPNAME:
      $ cat /usr/local/etc/gmoc_monitoring.conf
      
      # GMOC short name which is your username for authenticated monitoring data submission
      SITENAME=<gmoc_site>
      
      # GMOC short name of organization which manages your aggregate (may be the same as SITENAME)
      ORGNAME=<gmoc_org>
      
      # GMOC short name of "POP"/lab where your aggregate is located (may be the same as SITENAME)
      POPNAME=<gmoc_pop>
      
      # Fully qualified hostname of this node
      HOSTNAME=<fqdn>
      
  1. Create required directories:
    sudo mkdir -p /var/spool/rrds/REPORT
    

IV. Test the script

Run the monitoring and submission scripts by hand to make sure they work.

  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.
  1. Run the metric-gathering script by hand to make sure it works:
    sudo /usr/bin/metric_pgenishared
    
    • This should produce no output
    • After this runs, at least one RRD file should be created in /var/spool/rrds/metrics
  1. Run the data reporting script by hand to make sure it works:
    sudo /usr/bin/report_data_to_gmoc
    

VI. Install the scripts to run from cron

This only needs to be done the first time you install the monitoring software.

Add the two scripts to cron: modify the root crontab:

sudo crontab -e

and add the new lines:

*/1 * * * * /usr/bin/metric_pgenishared
*/5 * * * * /usr/bin/report_data_to_gmoc