wiki:ceasar/ganglia

以下動作皆在 DRBL server 上處理

Ganglia

  1. Install (Base on Ubuntu Dapper)
    • Install necessary package from repository : apache2-php4, php4-gd, php4-jpgraph, php4-rrdtool, rrdtool, gcc, g++, libc6, librrd2-dev
    • Download last stable version ganglia, In our case, use "ganglia-3.0.4.tar.gz"
      http://sourceforge.net/project/showfiles.php?group_id=43021&package_id=35280
      
    • 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
      
    • Install Web Frontend:
      $ cp -a web /var/www/ganglia
      
  1. Configure
    • Add a user, group for ganglia service, say "ganglia:ganglia"
    • On frontend, create a gmond configuration file named gmond.conf
      $ /opt/ganglia/sbin/gmond --default_config > /etc/gmond.conf
      
    • Edit file: /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
      }
      
      
    • On frontend, create a Gmetad configuration file named gmetad.conf
      $ cp /opt/src/ganglia-3.0.4/gmetad/gmetad.conf /etc/gmetad.conf
      
    • Edit file /etc/gmetad.conf
      data_source "Test Cluster" 127.0.0.1:8649
      
      trusted_hosts 127.0.0.1
      
      setuid_username "ganglia"
      
    • On frontend, edit web frontend configuration file "/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. Setup Ganglia service and start up
    • Perpare rrd log directory
      $ mkdir -p /var/lib/ganglia/rrds
      $ chown ganglia:ganglia /var/lib/ganglia/rrds
      
    • Start up service during booting, add the follow into file /etc/rc.local ---------> client 要保留,或以其他方式起動
      # Start up ganglia service
      /opt/ganglia/sbin/gmond
      /opt/ganglia/sbin/gmetad	'''--------> client 則可以不用'''
      
    • Start up necessary service now
      $ /opt/ganglia/sbin/gmetad
      $ /opt/ganglia/sbin/gmond
      
  1. Configure frontend php web page
    • Copy necessary frontend php scripts
      $ cp -a /opt/src/ganglia-3.0.4/web /var/www/ganglia
      
    • Make sure the follow session be set correctly file "/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";
      
Last modified 16 years ago Last modified on Mar 8, 2008, 5:52:01 PM