|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
The Ganglia open source project is a scalable, distributed system designed to monitor clusters and grids while minimizing the impact on their performance. When you enable Ganglia on your cluster, you can generate reports and view the performance of the cluster as a whole, as well as inspect the performance of individual node instances. For more information about the Ganglia open-source project, go to http://ganglia.info/.
To set up Ganglia monitoring on a cluster, you must specify the Ganglia bootstrap action when you create the cluster. You cannot add Ganglia monitoring to a cluster that is already running. Amazon EMR then installs the monitoring agents and the aggregator that Ganglia uses to report data.
When you create a new cluster using the CLI, you can specify the Ganglia bootstrap action by adding the following parameter to your cluster call:
The following command illustrates the use of the
bootstrap-action parameter when starting a new cluster.
In this example, you start the Word Count sample cluster provided by Amazon EMR and launch three instances.
In the directory where you installed the Amazon EMR CLI, run the following from the command line. For more information, see the Command Line Interface Reference for Amazon EMR.
Linux, UNIX, and Mac OS X users:
./elastic-mapreduce --create --alive --instance-type m1.xlarge --num-instances 3 \ --bootstrap-action s3://elasticmapreduce/bootstrap-actions/install-ganglia --stream \ --input s3://elasticmapreduce/samples/wordcount/input \ --output s3://myawsbucket/wordcount/output/2012-04-19 \ --mapper s3://elasticmapreduce/samples/wordcount/wordSplitter.py --reducer aggregate
ruby elastic-mapreduce --create --alive --instance-type m1.xlarge --num-instances 3 --bootstrap-action s3://elasticmapreduce/bootstrap-actions/install-ganglia --stream --input s3://elasticmapreduce/samples/wordcount/input --output s3://myawsbucket/wordcount/output/2012-04-19 --mapper s3://elasticmapreduce/samples/wordcount/wordSplitter.py --reducer aggregate
Ganglia provides a web-based user interface that you can use to view the metrics Ganglia collects. When you run Ganglia on Amazon EMR, the web interface runs on the master node and can be viewed using port forwarding, also known as creating an SSH tunnel. For more information about viewing web interfaces on Amazon EMR, see Web Interfaces Hosted on the Master Node.
To view the Ganglia web interface
Use SSH to tunnel into the master node and create a secure connection. For information about how to create an SSH tunnel to the master node, see Open an SSH Tunnel to the Master Node.
Install a web browser with a proxy tool, such as the FoxyProxy plug-in for Firefox, to create a SOCKS proxy for domains of the type *ec2*.amazonaws.com*. For more information, see Configure FoxyProxy to View Websites Hosted on the Master Node.
With the proxy set and the SSH connection open, you can view the HBase UI by opening a browser window with http://
master-public-dns-name is the public DNS address of the master server in the HBase cluster. For information about how to locate the public DNS name of a master node, see To locate the public DNS name of the master node using the Amazon EMR console.
When you open the Ganglia web reports in a browser, you see an overview of the cluster’s performance, with graphs detailing the load, memory usage, CPU utilization, and network traffic of the cluster. Below the cluster statistics are graphs for each individual server in the cluster. In the preceding cluster creation example, we launched three instances, so in the following reports there are three instance charts showing the cluster data.
The default graph for the node instances is Load, but you can use the Metric drop-down list to change the statistic displayed in the node-instance graphs.
You can drill down into the full set of statistics for a given instance by selecting the node from the drop-down list or by clicking the corresponding node-instance chart.
This opens the Host Overview for the node.
If you scroll down, you can view charts of the full range of statistics collected on the instance.
Ganglia reports Hadoop metrics for each node instance. The various types of metrics are prefixed by category: distributed file system (dfs.*), Java virtual machine (jvm.*), MapReduce (mapred.*), and remote procedure calls (rpc.*). You can view a complete list of these metrics by clicking the Gmetrics link, on the Host Overview page.