Gangila Installation
Ganglia is an open source monitoring project, designed to scale to thousands of nodes, that started at UC Berkeley. Each machine runs a daemon called gmond which collects and sends the metrics (like processor speed, memory usage, etc.) it gleans from the operating system to a specified host. The host which receives all the metrics can display them and can pass on a condensed form of them up a hierarchy. This hierarchical schema is what allows Ganglia to scale so well. gmond has very little overhead which makes it a great piece of code to run on every machine in the cluster without impacting user performance.
There are many articles and resources on the Internet that will show you how to install Ganglia. We will revisit the one I wrote on the xCAT wiki. I will assume for the purposes of this article that the operating system is some flavor of Red Hat 5 Update 2 (although the steps won’t be that much different for other enterprise Linux operating systems).
Provided you have your yum repository set up, installing prereqs should be easy for the most part. Something like this:
yum -y install apr-devel apr-util check-devel cairo-devel pango-devel libxml2-devel
rpmbuild glib2-devel dbus-devel freetype-devel fontconfig-devel gcc-c++ expat-devel
python-devel libXrender-devel
(Note: Yum is really supposed to handle most of these dependencies, but in one of my tests I saw failures to compile that were fixed by adding all these packages.)
After getting these, you need another prerequisite that is not in the Red Hat repository. You can get it and build it like this as long as your machine is connected to the Internet:
wget http://ga13.files.bigpond.com:4040/fedora/linux/releases/9/Everything/source/SRPMS/libconfuse-2.6-1.fc9.src.rpm
rpmbuild --rebuild libconfuse-2.6-1.fc9.src.rpm
cd /usr/src/redhat/RPMS/x86_64/
rpm -ivh libconfuse-devel-2.6-1.x86_64.rpm libconfuse-2.6-1.x86_64.rpm
Remember, mirrors often change. If this doesn’t work, then use a search engine to find the libconfuse-2.6.-1.fc9 source RPM.
RRDTool means: Round Robin Database Tool. It was created by Tobias Oetiker and provides an engine for many high performance monitoring tools. Ganglia is one of them, but Cacti and Zenoss are others.
To install Ganglia, we first need to have RRDTool running on our monitoring server. RRDTool provides two very cool functions that are leveraged by other programs:
It stores data in a Round Robin Database. As the data captured gets older, the resolution becomes less refined. This keeps the footprint small and still useful in most cases.
It can create graphs by using command-line arguments to generate them from the data it has captured.
To install RRDTool, run the following (tested on versions 1.3.4 and 1.3.6):
cd /tmp/
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz
tar zxvf rrdtool*
cd rrdtool-*
./configure --prefix=/usr
make -j8
make install
which rrdtool
ldconfig # make sure you have the new rrdtool libraries linked.
There are many ways you can use RRDTool as a standalone utility in your environment, but I won’t go into them here.
Now that you have all prerequisites, you can install Ganglia. First you need to get it. In this article we are using Ganglia 3.1.1. Download the ganglia-3.1.1.tar.gz file and place it in the /tmp directory of your monitoring server. Then do the following:
cd /tmp/
tar zxvf ganglia*gz
cd ganglia-3.1.1/
./configure --with-gmetad
make -j8
make install
You should exit without errors. If you see errors, then you may want to check for missing libraries.
| Artikel Details: | Views: |
|---|---|
| Last updated: 2010/07/16 |
|
| Autor: | |
|
|
