Introduction to ganglia monitoring and graphing
tool:
Every System administrator want
to monitor the entire cluster so there are many number of tools available for
in the market such as
1.Nagios
2.Ganglia
3.Centreon
4.etc
If suppose we have only for 10 nodes,
we don't want any monitoring tools. But
in Hadoop cluster has more node so it is not easy to monitoring the entire
cluster in manually. we want any one of
the monitoring tools . in this Document we will discuss Ganglia
Ganglia
Overview:
Ganglia
is an open source ,scalable and distributed monitoring System for large cluster. it represents the overall
performance of a cluster such as
1. Cpu usage
2. Memory usage
3. Network usage
4. Storage usage
5.etc
Ganglia
Architecture:
Ganglia Architecture
The above diagram shows the ganglia
Architecture. The Ganglia Monitoring tool has Four different components. Such as
1.Gmond(Ganglia Monitoring daemon)
2.Gmetad (Ganglia Meta daemon)
3.RRD tool(Round Robin Database Tool)
4.Gweb(Ganglia web)
1.Gmond(Ganglia
Monitoring daemon):
This is a small
services that is installed in every nodes. it is monitored the installed nodes
and collect the cpu information ,network information ,load information, storage
information and etc metrics information from this node.
The all collected metrics
information has been send xml format over via Tcp (Transfer control protocol).
The Main configuration files is present in the below directory
/etc/gmond.conf
or /etc/ganglia/gmond.conf. you can edit the file based on your configuration
Gmetad
(Ganglia Meta daemon):
Gmetad (Ganglia Meta
daemon) is the service it collects the metrics data from other Gmetad daemons
and all Gmond deamon. The collected information has been stored in RRD(Round
Robin Database) Format. A simple Query mechanism collecting the metrics
information about the group of machines.
Only one gmetad has been installed in entire
cluster. we don't want to installed Gmetad in every nodes in the cluster. if
you want to monitoring the Gmeatd daemon installed node, you need to install
the Gmond daemons in that node. The main configuration file is present in the
below directory /etc/gmetad.conf or /etc/ganglia/gmetad.conf . you can edit the
file based on your configuration.
RRD
Tools(Round Robin database Tools):
Ganglia uses The RRD tool to
store the data and visualization. it is the heart of the ganglia in graphing.
it is stored the data in time-series. for an example. The RRD tool will store
all the values of cpu loaded at certain time period and graphs those data
according to him.
GWeb
(Ganglia Web):
The Ganglia Won't be complete
without the Web interface. After collecting the information to evaluate how our
cluster is performing, so we need visual representation. it has PHP frontend
for displaying the all data information in the form of Graph
How to install Ganglia in Cluster:
master Node:
1.Download the Repositories
2.install the necessary package
$ yum install rrdtool ganglia ganglia-gmetad
ganglia-gmond ganglia-web httpd php apr apr-util
3.Edit the ganglia configuration file as per
below ( /etc/gmond.conf or /etc/ganglia/gmond.conf)
$ vi /etc/gmond.conf
cluster
{
name = "cluster1"
owner = "owner1"
latlong
= "unspecified"
url =
"unspecified"
}
udp_send_channel
{
host = ipaddress or hostname
port = 8649
ttl =
1
}
udp_recv_channel
{
port = 8649
}
tcp_accept_channel {
port = 8649
}
Note: Edit the green line based on your
cluster configuration
4.Edit
the gmetad configuration file /etc/gmetad.conf or /etc/ganglia/gmetad.conf
data_source "cluster1"
192.168.1.253:8649
5.Start
the gmond service and make sure it starts at boot
$ chkconfig gmond on
$ service gmond start
6.
Start the gmetad service and make sure it starts at boot
$ chkconfig gmetad on
$ service gmetad start
7.Enable the http daemon, to be able to see
the pretty monitoring pictures
$ chkconfig httpd on
$ service httpd start
Slave nodes:
1.
Download the repositories
2.
install the ganglia monitoring deamon
$ yum install
ganglia-gmond
3.
Edit the gmond configuration file /etc/gmond.conf
(As ber the master node)
4.Start
the gmond service and make sure it starts at boot
$ chkconfig gmond on
$
service gmond start
WEB
INTERFACE
The Monitoring
the Hadoop and Hbase cluster using Ganglia
1.Edit
the hadoop-metrics.properties based on the below configuration
$ vi etc/hadoop/conf/hadoop-metrics.properties
dfs.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
dfs.period=10
dfs.servers=hostname:8649
mapred.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
mapred.period=10
mapred.servers=hostname:8649
jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
jvm.period=10
jvm.servers=hostname:8649
rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
rpc.period=10
rpc.servers=hostname:8649
2.Edit
the hbase confgiuration file
$ vi /etc/hbase/conf/
hadoop-metrics.properties
hbase.extendedperiod = 3600
hbase.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
hbase.period=10
hbase.servers=Hostname:8649
jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
jvm.period=10
jvm.servers=Hostname:8649
rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
rpc.period=10
rpc.servers=Hostname:8649
3.restart
the gmond from all nodes
4.restart
the hbase and hadoop services



