Ganglia is an open-source Real-time Monitoring project initiated by UCBerkeley to measure thousands of nodes and provide system static data and important performance measurement data for cloud computing systems. The Ganglia system consists of the following three parts. Gmond: Gmond runs on each computer. It mainly monitors each machine to collect and send metric data (such as processor speed and memory usage ). Gmetad: Gmetad runs on a Cluster host as a WebServer or
Ganglia is an open-source Real-time Monitoring project initiated by UC Berkeley to measure thousands of nodes and provide system static data and important performance measurement data for cloud computing systems. The Ganglia system consists of the following three parts.
Gmond: Gmond runs on each computer. It mainly monitors each machine to collect and send metric data (such as processor speed and memory usage ).
Gmetad: Gmetad runs on a host in the Cluster as a Web Server or communicates with the Web Server.
Ganglia Web Front-end: the Web Front-end is used to display the Metrics chart of Ganglia.
Hadoop and HBase support Ganglia very well. Through simple configuration, some key parameters of Hadoop and HBase can be displayed on the Web Console of Ganglia in the form of charts. These are of great help for us to understand the internal system status of Hadoop and HBase.
1. Prepare
Install dependency:
Apt-get install rrdtool apache2 php5
2. Installation
Install ganglia:
Apt-get install ganglia *
3. Configuration
Configure the ganglia Server:
Cd/etc/ganglia
Edit the configuration file gmond. conf:
Vimgmond. conf
Globals {
....
Setuid = yes
....
}
Cluster {
Name = "my cluster" // This name is very important
Owner = "nobody"
....
}
Udp_send_channel {
Host = 192.168.1.5 // use host as unicast and mcast_join as Multicast
Port = 8649
Ttl = 1
}
Udp_recv_channel {// If standalone broadcast is used, delete "mcast_join" and "bind"
/* Mcast_join = 239.2.11.71 */
Port = 8649
/* Bind = 239.2.11.71 */
Edit the configuration file gmetad. conf
Vim gmetad. conf
# Configure a data source named "heipark", which must be consistent with/etc/gmond. conf, and the following ip address is the server ip address.
Data_source "my cluster" 192.168.1.5
Configure the ganglia client:
Copy the/etc/ganglia/gmond. conf file to the client/etc/ganglia/
Scp/etc/ganglia/gmond. conf root @ {ip}:/etc/ganglia/gmond. conf
4. Run
Server
Servicegmetad restart
Service ganglia-monitor restart
Serviceapache2restart
Client
Service ganglia-monitor restart
5. Test
# Command line printing current active client
Gstat-
# Displaying the current client status on the web
Http: // {your_ip}/ganglia