- gmond
- gmetad
- Web Front End
- Ubuntu 9.04;
- Ganglia Monitoring Core 3.0.7
- Hadoop 0.20.2
3. Installing gmond and gmetad
$ sudo apt-get install build-essential librrd2-dev libapr1-dev libconfuse-dev libexpat1-dev python-dev
Creating a user called 'ganglia' and extracting the packet:
$ 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
Installing gmond:
(Assume installation directory at /opt/ganglia-3.0.7 and configuration directory at /etc)
$ 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
Generate a configuration file:
# 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
}
Run gmond as sudo:
$ sudo gmond
Check the daemon with ps :
$ 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
Listen to gmond port with telnet to check if everything is alright:
$ telnet localhost 8649
Note:If XML lines appear in your terminal, everything is working fine
3.2 Running gmetad
Like gmond, gmetad also has a configuration file. Move it to config directory:
$ sudo cp gmetad/gmetad.conf /etc/
Afterwards insert the following lines:
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/
Run gmetad on debug mode to check if everything is alright:
$ sudo gmetad -d 1
Open front-end to test the services:
http://<hostname>/ganglia/
If everything is working fine, kill gmetad process (debug mode) and start it as:
$ 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
Note: restart Hadoop. Afterwards, restart gmond and gmetad daemons.



被折叠的 条评论
为什么被折叠?



