Ganglia - A walkthrough

What Is Ganglia?

Ganglia is a distributed and highly-scalable cluster monitoring tool based on a hierarchical model that supports a federation of clusters. Ganglia is easy to use, to install and to customize. It allows monitoring of memory, disk, CPU usage and other aspects of vital cluster health, and makes that information available for offline analysis.

The following table lists the file types used by Ganglia:

XML

For Data Representation

XDR

For Data Transportation

RRD tool

For Data Visualization and Data Storage

The Ganglia monitoring system consists of 3 main packages:

  1. Ganglia monitor, named gmond, runs on every node that’s being monitored.

  1. Ganglia meta data monitor, named gmetad, is a daemon that polls and collects metrics from gmond on remote machines. It stores the metrics using storage engines like RRD, and is also responsible for publishing to web UI.

  1. Ganglia web front-end, named ganglia-web, resides on the same machine as gmetad and accesses the RRD files.

Steps for installing Ganglia on a Debian/Ubuntu:

Prerequisites: Apache Web Server and RRD Tool.

To install gmond and gmetad, run the following command:

sudo apt-get install ganglia-monitor gmetad

To install the web front-end, run the following command:

sudo apt-get install ganglia-webfrontend

To enable the web front-end, run the following commands:

cd /etc/apache2/sites-enabled
sudo ln -s /etc/ganglia-webfrontend/apache.conf ganglia.conf
sudo service apache2 stop
sudo service apache2 start

Configuring Gmond and Gmetad:

Gmond Configuration: This file can be found at /etc/ganglia/gmond.conf. The default configuration is multicast mode, but it can also be set for unicast. In multicast the gmond sends data to all nodes, while in unicast the data is sent only to nodes specified by IP. The unicast configuration is a little more complex, but is less noisy and offers less redundancy than multicast. Be aware that many cloud environments, such as AWS, will disable multicast IP packets.

To configure gmond in unicast mode, set one machine as a receiver and the rest as senders.

Gmetad Configuration: This file can be found at /etc/ganglia/gmetad.conf. It contains the cluster and host names from which it will collect the data, e.g., data_source <cluster_name> <hostname>.

Ganglia Web 2:

Ganglia Web 2 is a refresh of Ganglia PHP UI. The following image depicts its new features:

  1. Timeline Zooming allows you to zoom to arbitrary time by clicking on any graph.

  1. Aggregate Graphs allows you to overlay the same metric based on host regular expressions.

  1. Views provides arbitrary collection of metrics.

  1. Mobile provides a mobile optimized view.

  1. Export metric data in JSON/CSV.

Steps for installing Ganglia Web 2:

1. Download the latest release from https://sourceforge.net/projects/ganglia/files/gweb/.

2. Untar the release:

tar xvf gweb-&lt;version&gt;.tar.gz
 mv gweb-&lt;version&gt; ganglia2
cd  ganglia2

3. Edit the Makefile by adjusting the DESTDIR to where you copied your files, e.g., /var/www/ganglia2, and setting APACHE_USER to the name of the user that runs the Apache server, e.g., apache or www-data (Ubuntu/Debian).

4. Install using the command sudo make install

Here is how the Ganglia Web 2 interface will look:

January 23, 2014 /

About the Author

Flux7 Labs
Find me on:

Join Us

Join thousands of technology enthusiasts, subscribe and get expert perspective in your inbox.

Connect With Us

Recent Posts

Categories