A Simple Ganglia MDS Information Provider


The purpose of writting the Simple Ganglia MDS Information Provider is to provide a simple and flexible script that can publish resource info from the Ganglia monitoring system into MDS, overcoming the limitations of the "Conventional" Ganglia MDS Information Provider .

Ganglia Information that gets Published into MDS

The output of the Ganglia Information that gets published into MDS is detemined by the Glue-CE Schema. Currently the following info is published per host :
Common NameAttribute
Hostname GlueHostName
A Unique ID assigned to the host GlueHostUniqueID
Processor Load, 1 Min Average GlueHostProcessorLoadLast1Min
Processor Load, 5 Min Average GlueHostProcessorLoadLast5Min
Processor Load, 15 Min Average GlueHostProcessorLoadLast15Min
SMP Load, 1 Min Average GlueHostSMPLoadLast1Min
SMP Load, 5 Min Average GlueHostSMPLoadLast5Min
SMP Load, 15 Min Average GlueHostSMPLoadLast15Min
Number of CPUs GlueHostArchitectureSMPSize
Processor Clock Speed (MHz) GlueHostProcessorClockSpeed
The name of the Network Interface GlueHostNetworkAdapterName
Network Adapter IP address GlueHostNetworkAdapterIPAddress
The amount of RAM GlueHostMainMemoryRAMSize
Free RAM (in KBytes) GlueHostMainMemoryRAMAvailable

Differences with the Conventional Ganglia IP

How to fix the "Conventional" Ganglia IP

Here is an outline of the modifications you need to make in the Information Provider to publish all the expected info into MDS.

Configure MDS to use the Ganglia IP

To use our Ganglia IP, you need to follow the same steps that you follow when you configure any Custom Information Provider.

Testing access to a Ganglia Server

Before you begin changing the MDS configuration make sure you have permission to access the gmond or gmetad server. You should try to connect to the appropriate port using telnet. Your host must be listed in the trusted_host list in the file /etc/gmond. Running the following commands (for a gmond and a gmetd respectivelly) you should get output in XML format.
             telnet rcas6060.rcf.bnl.gov 8649
             telnet ganglia01.rcf.bnl.gov 8651

Download the Information Provider

Our Ganglia IP is currently being tested at BNL. You can download the Perl script from here .
One (and hopefully only) thing that you have to change in the script is the very first line. Change #!/opt/star/bin/perl to the appropriate path where Perl is installed on your system (something like #!/usr/bin/perl).
ganglia_ip.pl uses three Perl Modules: IO::Socket, Getopt::Long and XML::Parser. If you are missing any of the three modules you can download them from the Perl web site. If Perl Modules on your system are installed in non-standard places you may have to set the environment variable $PERL5LIB appropriately.
The next step would be to run the Ganglia IP from the command line (a full listing of command line options is described in the man pages).
              /opt/bin/ganglia_ip -h rcas6060.rcf.bnl.gov -p 8649 -o mds

Configure MDS to use a new Custom IP

The Ganglia IP is just another Custom IP and MDS must know how to invoke it. Edit the file $GLOBUS_LOCATION/etc/grid-info-resource-ldif.conf and add the following lines:
                dn: Mds-Vo-name=local, o=grid
                objectclass: GlobusTop
                objectclass: GlobusActiveObject
                objectclass: GlobusActiveSearch
                type: exec
                path: /opt/bin
                base: ganglia_ip
                args: -h ganglia01.rcf.bnl.gov -p 8651 -o mds
                cachetime: 45
                timelimit: 20
                sizelimit: 100

Download the Glue-CE Schema

Download the Glue Schema and configure MDS to use it. The schema can be downloaded from the DataTAG web Page (Under Glue Schema 1.1, select Computing (FINAL), then LDAP Schema Implementation and then download under the latest Revision). Save the file under $GLOBUS_LOCATION/etc/Glue-CE.schema
You should now make MDS aware of the new schema and instruct it to use it by editting your $GLOBUS_LOCATION/etc/grid-info-slapd.conf configuration file to include the following line:
                include         $GLOBUS_LOCATION/etc/Glue-CE.schema

Restart MDS

Finally, restart MDS:
                $GLOBUS_LOCATION/sbin/SXXgris stop
                $GLOBUS_LOCATION/sbin/SXXgris start

Quering MDS for Ganglia Info.

You should now be able to use the grid-info-search utility to query MDS and look for Ganglia info. For example, on stargrid02.rcf.bnl.gov I use the following query to find info about the STAR CRS hosts:
                grid-info-search -b "cl=STAR CRS Linux Cluster, mds-vo-name=local, o=grid"
The arguments that you need to use with the grid-info-search utility depend on whether your MDS server (GRIS/GIIS) alows anonymous bind. We are currently working on developing Java classes and interfaces that will allow programmatic access to ganglia MDS info (both anonymous and authorized access).

man Pages

The man pages provide more info on the code details and available options.

Stratos Efstathiadis - page was last modified