Installing Ganglia on CentOS

In this article we will install the Ganglia monitoring system on a set of machines running CentOS. There are two kinds of machines involved:
- The meta node: one machine that receives all measurements and presents it to a client through a website.
- The monitoring nodes: machines that run only the monitoring daemon and send the measurements to the meta node.
Meta node
For this example we assume the meta node has the IP address 192.168.1.253. We start by installing the necessary software:
To enable EPEL for CentOS 5
For 32-bits
# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
For 64-bits
# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
To enable EPEL for CentOS 4For 32-bits
# rpm-Uvh http://download.fedora.redhat.com/pub/epel/4/i386/epel-release-4-10.noarch.rpm
For 64-bits
# rpm-Uvh http://download.fedora.redhat.com/pub/epel/4/x86_64/epel-release-4-10.noarch.rpm
INSTALL:
yum install rrdtool ganglia ganglia-gmetad ganglia-gmond ganglia-web httpd php apr apr-util
If you want to monitor the meta node as well as the monitoring nodes, edit the gmond configuration file /etc/gmond.conf:
cluster {
name = "cluster1"
owner = "owner1"
latlong = "unspecified"
url = "unspecified"
}
udp_send_channel {
host = 192.168.1.253
port = 8649
ttl = 1
}
udp_recv_channel {
port = 8649
}
Start the gmond service and make sure it starts at boot:
chkconfig gmond on
service gmond start
Edit the gmetad configuration file /etc/gmetad.conf:
data_source "my cluster" 192.168.1.253:8649
Start the gmetad service and make sure it starts at boot:
chkconfig gmetad on
service gmetad start
Enable the http daemon, to be able to see the pretty monitoring pictures:
chkconfig httpd on
service httpd start
Monitoring nodes
On all the monitoring nodes start by installing the necessary software:
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
yum install ganglia-gmond
Edit the gmond configuration file /etc/gmond.conf. You can use an exact replica of the gmond configuration file shown for the meta node.
Start the gmond service and make sure it starts at boot:
chkconfig gmond on
service gmond start
If you would like to emit your own measurements (called metrics in Ganglia) and view them on the website, call the gmetric program:
gmetric --name mymetricname --value mymetricvalue --type string
To use the output of a program you wrote as a metric, simply call it like this, making sure to use backticks (`) instead of quotes (‘):
gmetric --name mymetricname --value `/home/user/mymetricprogram` --type string
About this entry
You’re currently reading “ Installing Ganglia on CentOS ,” an entry on Evan Conkle
- Published:
- 12.21.11 / 8pm
- Tags:
-
cluster, ganglia, ganglia-web, hadoop, install, monitor, monitoring, yum
No comments
Jump to comment form | comments rss [?] | trackback uri [?]