org.globus.mds.usefulrp.glue
Class GangliaElementProducer

java.lang.Object
  extended byorg.globus.mds.usefulrp.glue.GangliaElementProducer
All Implemented Interfaces:
GLUEElementProducer

public class GangliaElementProducer
extends Object
implements GLUEElementProducer

An instance of this class will provide an XML element for a cluster in the GLUE schema using data gathered from a ganglia gmetad that should be running elsewhere. This can then be used, for example, as a ResourceProperty value.


Field Summary
(package private)  String gangliaClusterIdentifier
          Cluster to report info for.
(package private)  String gangliaHostName
          hostname or IP address to connect to for Ganglia data.
(package private)  int gangliaTCPPort
          TCP port to connect to for Ganglia data.
private static org.apache.commons.logging.Log logger
           
(package private)  String xsltFilename
          Points to the XSLT file that will perform the glue to ganglia transformation.
 
Constructor Summary
GangliaElementProducer()
          Creates an instance with all default params.
 
Method Summary
 org.w3c.dom.Element getElement()
          poll for data from ganglia and returns as an Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final org.apache.commons.logging.Log logger

gangliaHostName

String gangliaHostName
hostname or IP address to connect to for Ganglia data. defaults to localhost.


gangliaTCPPort

int gangliaTCPPort
TCP port to connect to for Ganglia data. defaults to port 8649


gangliaClusterIdentifier

String gangliaClusterIdentifier
Cluster to report info for. XML from the Ganglia daemon may contain information for multiple clusters, but we want to select a specific one. For the moment, just use a cluster name -- potentially it would be necessary to match against Grid name too if Ganglia has such an attribute?


xsltFilename

String xsltFilename
Points to the XSLT file that will perform the glue to ganglia transformation. TODO Probably should be configurable?

Constructor Detail

GangliaElementProducer

public GangliaElementProducer()
Creates an instance with all default params.

Method Detail

getElement

public org.w3c.dom.Element getElement()
                               throws Exception
poll for data from ganglia and returns as an Element. TODO: tighten exceptions / eliminate altogether

Specified by:
getElement in interface GLUEElementProducer
Throws:
Exception