3. Installing gmond and gmetad
$ sudo apt-get install build-essential librrd2-dev libapr1-dev libconfuse-dev libexpat1-dev python-dev
$ sudo adduser --disabled-login --no-create-home ganglia
$ sudo tar -xzvf ganglia-3.0.7.tar.gz -C /opt
$ sudo chown -R ganglia:ganglia /opt/ganglia-3.0.7
$ cd /opt/ganglia-3.0.7
$ sudo ./configure --with-gmetad$ sudo make && make install
$ sudo apt-get install rrdtool
$ sudo apt-get install apache2 php5-mysql libapache2-mod-php5
$ sudo cp -r ganglia-3.0.7/web /var/www && mv /var/www/web /var/www/ganglia
# gmond --default_config > /etc/gmond.conf
globals {
user = ganglia
}
cluster {
name = "<cluster_name>"
owner = "<owner_name>"
latlong = "unspecified"
url = "unspecified"
}
(Disable multicast and define the host where nodes in the cluster send data)
udp_send_channel {
#mcast_join = 239.2.11.71
host = <hostname>
port = 8649
ttl = 1
}
udp_recv_channel {
#mcast_join = 239.2.11.71
port = 8649
#bind = 239.2.11.71
}
$ sudo gmond
$ ps aux | grep gmond
nobody 24069 3.1 0.7 4304 1872 ? Ss 15:45 0:00 gmond
rhodesmi 24071 0.0 0.2 3004 756 pts/0 R+ 15:45 0:00 grep gmond
$ telnet localhost 8649
$ sudo cp gmetad/gmetad.conf /etc/
setuid_username "ganglia"
data_source "<master>" <hostname>
gridname "<cluster_name>"
$ sudo mkdir -p /var/lib/ganglia/rrds/
$ sudo chown -R ganglia:ganglia /var/lib/ganglia/rrds/
$ sudo gmetad -d 1
http://<hostname>/ganglia/
$ sudo gmetad
dfs.class=org.apache.hadoop.metrics.ganglia.GangliaContext
dfs.period=10
dfs.servers=<hostname>:8649
mapred.class=org.apache.hadoop.metrics.ganglia.GangliaContext
mapred.period=10
mapred.servers=<hostname>:8649
jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext
jvm.period=10
jvm.servers=<hostname>:8649
rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext
rpc.period=10
rpc.servers=<hostname>:8649