Ganglia - A walkthrough

  • janvier 22, 2014

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.

  2. 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.

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

Ganglia semantic overview diagram

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 an arbitrary time by clicking on any graph.

  2. Aggregate Graphs allow you to overlay the same metric based on host regular expressions.

  3. Views provide an arbitrary collection of metrics.

  4. Mobile provides a mobile-optimized view.

  5. Export metric data in JSON/CSV.

New features in Ganglia Web 2

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:

Screenshot of the Ganglia Web 2 interface


 

Subscribe to our blog

ribbon-logo-dark

Related Blog Posts