Ganglia is a scalable distributed system monitor tool for high-performance computing systems such as clusters and grids. It allows the user to remotely view live or historical statistics (such as CPU load averages or network utilization) for all machines that are being monitored.[1]
It has 2 operations
Ganglia Meta Daemon (gmetad)
The meta node: one machine that receives all measurements and presents it to a client through a website.
Ganglia Monitoring Daemon (gmond)
The monitoring nodes: machines that run only the monitoring daemon and send the measurements to the meta node
Installation below will be in metanode and monitoring daemon:
CentOS 6 and above :
1. Download : Add the EPEL (Extra Package Enterprise Linux) repository to your system. By downloading epel-release-6-8.noarch.rpm
2. Install rpm
$ rpm -ivh epel-release-6-8.noarch.rpm
Note : Once its installed under /etc/yum.repos.d/ you can see epel repo. This repo contains ganglia packages to install.
MetaNode Machine (Ganglia Server)
Before you proceed, Make sure you downloaded and installed RPM following above mentioned steps.
$ yum install ganglia ganglia-gmetad ganglia-web ganglia-gmond
Note : ganglia-web is for web. Ganglia runs in Apache Webserver. It has php front-end. The message transfer in UDP (unified data protocol) XML.
Update Ganglia Client / Server configuration
$ vi /etc/ganglia/gmond.conf
cluster {
name = "my servers"
owner = "unspecified"
latlong = "unspecified"
url = "unspecified"
}
udp_send_channel {
host = collector.mycompany.com
port = 8649
}
udp_recv_channel {
port = 8649
}
tcp_accept_channel {
port = 8649
}
Note : This allows collector.mycompany.com to receive monitoring data from every node on port 8649(UDP). The cluster name and gmetad.conf datasource name should be same. Remove mcast_join and put host in gmond.conf
Update Apache Configuration - ServerName
Uncomment
serverName in apache configuration and update.
$ vi /etc/httpd/conf/httpd.conf
ServerName example.com:80
Update Ganglia Server Configuration
Change ganglia Configuration in location tag from
'All' to
'Allow'
$ vi /etc/httpd/conf.d/ganglia.conf
Command to Start Ganglia & Gmond & apache Service in Ganglia Server
$ /etc/init.d/gmond start
$ /etc/init.d/gmetad start
$ /etc/init.d/httpd start
Steps to Install Ganglia Client Services in Clusters (Ganglia Client Nodes)
Before you proceed, Make sure you downloaded and installed RPM following above mentioned steps.
$ yum install ganglia ganglia-gmond
Update Ganglia Client (Gmond) Configuration
$ vi /etc/ganglia/gmond.conf
cluster {
name = "PRODUCTION"
owner = "unspecified"
latlong = "unspecified"
url = "unspecified"
}
udp_send_channel {
host = collector.mycompany.com
port = 8649
}
/*udp_recv_channel {
}
tcp_accept_channel {
}*/
Note : This tells gmond to send the info to ganglia server (master) host ip(collector.mycompany.com) on port 8649(UDP). Cluster Name assigned value can be hostname or dataSourceName of ganglia server (Master). Remove udp_recv_channel and tcp_accept_channel from gmond configuration. Also, Remove mcast_join and put host in gmond.conf
Restart gmond service in ganglia client
$ service gmond restart
Access Ganglia Server through your browser using URL as configured:
collector.mycompany.com/ganglia