Wednesday, November 06, 2013

Install Ganglia on CentOS 6.x

Ganglia is a scalable distributed monitoring system for high-performance computing systems such as clusters and Grids. It is based on a hierarchical design targeted at federations of clusters. It leverages widely used technologies such as XML for data representation, XDR for compact, portable data transport, and RRDtool for data storage and visualization.

Ganglia is split into different parts with different functions:
  • gmond collects data on each node
  • gmetad consolidates data on the head node
  • rrdtool is used by gmetad for its database of metrics
  • graphed data is viewed via a php web interface
There are two ways you can install Ganglia, from EPEL repo or from the source. I choose to install from EPEL repo. Compile everything from source and copy gmond binary is less manageable.

Install ganglia’s gmetad, gmond & web interface on your head/management node:
# yum install rrdtool ganglia ganglia-gmetad ganglia-gmond ganglia-web httpd php

If you don’t have the EPEL repo, do this: Install EPEL on CentOS

Ganglia can pass info over regular udp or multicast. I do not recommend multicast unless you have an exceptionally large clusters and understand how multicast is routed.

In /etc/gmond.conf, define your cluster name and send/receive ports. With this example, is our head node and 8601 the port.

name = "compressor"
owner = "unspecified"
latlong = "unspecified"
url = "unspecified"

udp_send_channel {
host =
port = 8601

udp_recv_channel {
port = 8601
family = inet4
and start the service:
# chkconfig gmond on
# service gmond start

Edit /etc/gmetad.conf and define your cluster name as a data_source

data_source "compressor"

and start the service:
# chkconfig gmetad on
# service gmetad start
start httpd to view the web interface:
# chkconfig httpd on
# service httpd start

Now on all your compute nodes, install gmond:
# yum install ganglia-gmond
# chkconfig gmond on

Make sure to define the cluster name and send/receive ports by copying your /etc/gmond.conf to each node. Then start the service on each node:


1 comment:

Marshall628 said...

Most interesting part for Ganglia is that it could be called by some python/perl scripts to poll the results with certain interval.

I've used the ganglia monitor with flume. It works pretty well.