In this post, I bring to you a quick intro to Ganglia - an integrated framework for performance monitoring.
Why This Kolaveri Di?
The most challenging (and painful) aspect of System Performance Monitoring is to keep track of historical values, having to sift through 'top' output logs over time, parse them, make meaningful info out of them for a pretty report, and finally... dump them into some folder location (hoping that we never look at it again)... and lo! there is that moment when someone shoots out "Hey! What was the CPU usage pattern, during that week, and this time, when we did some action", and the performance test teams go - "Why this Kolaveri?". Yea... I've been there and experienced that
.
So, I embarked on setting up Ganglia, an open source performance monitoring framework for capturing system perf metrics, every hour, every day, every month, and every year.... and automatically! How cool is that !?
When to use Ganglia?
When you have at least two or more systems where you would like to measure the following on a continuous basis, Ganglia comes pretty handy.
- CPU (User, System, Idle etc.)
- Memory (Used, Cached, Buffers, etc.)
- Load and load averages
- Network I/O
Overview
Ganglia operates on a client / server architecture, where there is a central Ganglia server that receives a regular feed of perf metrics from clients
The Ganglia server runs the following:
- Ganglia Monitoring Daemon (gmond) - which polls the system regularly for the performance metrics
- Ganglia Meta Daemon (gmetad)
The Ganglia clients run the following:
- Ganglia Monitoring Daemon (gmond) - which polls the system regularly for the performance metrics and reports into the gmond running on Ganglia server.
How to setup ?
There are tons of HOWTOs out there describing installation and config of Ganglia, so I will not go into the specifics. But at a high level here's what you need to know:
- Setup a simple commodity server (or VM) as the Ganglia server; build and install RRDtool, Gmetad and Gmond
- To add any client to the Ganglia monitoring, build and install Gmond on the client. Add an entry for the client's IP in the Gmetad.conf file on the server.
Advantages
Here are some features why Ganglia can be very handy:
- One time pain of setting up the server box; subsequent additions of clients into the monitoring is pretty simple
- Easy to include additional monitoring capabilities using gmetric and by writing custom python modules
- And the BIGGEST advantage of all - view performance metrics of servers over YEARS.. Yayy!!

