以下動作皆在 DRBL server 上處理 == Ganglia == 1. Install (Base on Ubuntu Dapper) 1.1 Install necessary package from repository : apache2-php4, php4-gd, php4-jpgraph, php4-rrdtool, rrdtool, gcc, g++, libc6, librrd2-dev 1.1 Download last stable version ganglia http://sourceforge.net/project/showfiles.php?group_id=43021&package_id=35280 (In our case, use "ganglia-3.0.4.tar.gz" ) 1.1 Uncompress package, and configure and make {{{ $ tar xzvf ganglia-3.0.4.tar.gz; cd /ganglia-3.0.4 $ ./configure --with-gmetad --prefix=/opt/ganglia $ make $ sudo make install }}} 1.1 Install Web Frontend: {{{ $ cp -a web /var/www/ganglia }}} 1.2 Configure 1.2.0 Add a user, group for ganglia service, say "ganglia:ganglia" 1.2.1 On frontend, create a gmond configuration file named gmond.conf $ /opt/ganglia/sbin/gmond --default_config > /etc/gmond.conf $ vi /etc/gmond.conf globals { daemonize = yes setuid = yes user = ganglia -------------> match 1.2.0 debug_level = 0 max_udp_msg_len = 1472 mute = no deaf = no host_dmax = 0 /*secs */ cleanup_threshold = 300 /*secs */ gexec = no } cluster { name = "DRBL Cluster Project" -------------> as you want owner = "NCHC OSS Lab" -------------> as you want latlong = "unspecified" url = "unspecified" } udp_send_channel { host = 192.168.201.254 ---------------> match your LAN connection ip port = 8649 } 1.2.2 On frontend, create a Gmetad configuration file named gmetad.conf $ cp /opt/src/ganglia-3.0.4/gmetad/gmetad.conf /etc/gmetad.conf $ vi /etc/gmetad.conf data_source "Test Cluster" 127.0.0.1:8649 trusted_hosts 127.0.0.1 setuid_username "ganglia" 1.2.3 On frontend, edit web frontend configuration file named conf.php $ vi /var/www/ganglia/conf.php $gmetad_root = "/var/lib/ganglia"; $rrds = "$gmetad_root/rrds"; define("RRDTOOL", "/usr/bin/rrdtool"); $ganglia_ip = "127.0.0.1"; 1.3 Setup Ganglia service and start up 1.3.1 Perpare rrd log directory $ mkdir -p /var/lib/ganglia/rrds $ chown ganglia:ganglia /var/lib/ganglia/rrds 1.3.2 Setup service on /etc/rc.local ---------> client 要保留,或以其他方式起動 $ vi /ect/rc.local # Start up ganglia service /opt/ganglia/sbin/gmond /opt/ganglia/sbin/gmetad --------> client 則可以不用 1.3.3 Start up necessary service $ /opt/ganglia/sbin/gmetad $ /opt/ganglia/sbin/gmond 1.4 Setup frontend php web page 1.4.1 Copy necessary frontend php scripts $ cp -a /opt/src/ganglia-3.0.4/web /var/www/ganglia 1.4.2 Make sure the follow session is correct in config.conf $ vi /var/www/ganglia/conf.php $gmetad_root = "/var/lib/ganglia"; $rrds = "$gmetad_root/rrds"; define("RRDTOOL", "/usr/bin/rrdtool"); $ganglia_ip = "127.0.0.1";