Ganglia » History » Version 1

Anonymous, 08/19/2008 05:02 PM
Installation Guide: Ganglia

1 1 Anonymous
= Monitoring of Cluster Resources: Ganglia =
2 1 Anonymous
''Ganglia is a scalable distributed monitoring system for high-performance computing systems such as clusters and Grids.''
3 1 Anonymous
4 1 Anonymous
 * Download the latest release of the ''Ganglia Monitoring Core'' from [http://ganglia.sourceforge.net/ http://ganglia.sourceforge.net].
5 1 Anonymous
 * Install Ganglia into ''/usr/local/ganglia'', its web frontend into ''/usr/local/ganglia/html/', and its databases into ''/usr/local/ganglia/rrds/'.
6 1 Anonymous
 * Install the ''Ganglia Monitoring Daemon'' (gmond) on each node, and the ''Ganglia Meta Daemon'' (gmetad) on the the head node.
7 1 Anonymous
8 1 Anonymous
== Ganglia Monitoring Daemon ==
9 1 Anonymous
 * Configure, build and install Ganglia on each slave node (only with ''gmond''):
10 1 Anonymous
  {{{
11 1 Anonymous
  ./configure --prefix=/usr/local
12 1 Anonymous
  }}}
13 1 Anonymous
  and on the master node (with ''gmond'' and ''gmetad''):
14 1 Anonymous
  {{{
15 1 Anonymous
  ./configure --prefix=/usr/local --with-gmeta
16 1 Anonymous
  }}}
17 1 Anonymous
18 1 Anonymous
 * Initialise the configuration file for ''gmond'':
19 1 Anonymous
  {{{
20 1 Anonymous
  gmond --default >> /etc/gmond.conf
21 1 Anonymous
  }}}
22 1 Anonymous
23 1 Anonymous
 * Configure the ''Ganglia Monitoring Daemon'' in ''/etc/gmond.conf'':
24 1 Anonymous
  * Set the name of the cluster: 
25 1 Anonymous
  {{{
26 1 Anonymous
  cluster {
27 1 Anonymous
    name = "ProCKSI"
28 1 Anonymous
  }
29 1 Anonymous
  }}}
30 1 Anonymous
  * Set the IP address and port for multicast data exchange:
31 1 Anonymous
  {{{
32 1 Anonymous
  udp_send_channel {
33 1 Anonymous
    mcast_join = 239.2.11.71
34 1 Anonymous
    port = 8649
35 1 Anonymous
  }
36 1 Anonymous
  udp_recv_channel {
37 1 Anonymous
    mcast_join = 239.2.11.71
38 1 Anonymous
    port = 8649
39 1 Anonymous
    bind = 239.2.11.71
40 1 Anonymous
  }
41 1 Anonymous
  }}}
42 1 Anonymous
 
43 1 Anonymous
 * Copy start-up script for ''gmond'':
44 1 Anonymous
  {{{
45 1 Anonymous
  cp ./gmond/gmond.init /etc/init.d/gmond
46 1 Anonymous
  }}}
47 1 Anonymous
48 1 Anonymous
 * Add additional route for correct data exchange via multicast using the ''internal'' interface (''eth0''). Modify ''/etc/inid.d/gmond'':
49 1 Anonymous
  {{{
50 1 Anonymous
   #Add multicast route to internal interface
51 1 Anonymous
   /sbin/route add -host 239.2.11.71 dev eth0
52 1 Anonymous
   daemon $GMOND
53 1 Anonymous
  }}}
54 1 Anonymous
  {{{
55 1 Anonymous
   #Remove multicast route to internal interface
56 1 Anonymous
   /sbin/route delete -host 239.2.11.71 dev eth0
57 1 Anonymous
   killproc gmond
58 1 Anonymous
  }}}
59 1 Anonymous
 * Make the Ganglia Monitoring Daemon start at bootup.
60 1 Anonymous
  {{{
61 1 Anonymous
   /sbin/chkconfig  gmond  on
62 1 Anonymous
  }}}
63 1 Anonymous
 * Start the Ganglia Monitoring Daemon:
64 1 Anonymous
  {{{
65 1 Anonymous
   /sbin/service  gmond  start
66 1 Anonymous
  }}}
67 1 Anonymous
  
68 1 Anonymous
== Ganglia Meta Daemon ==
69 1 Anonymous
 * Install and configure the ''Ganglia Meta Daeomn'' (gmetad) on the master node.
70 1 Anonymous
71 1 Anonymous
 * Make the Ganglia Meta Daemon start at bootup.
72 1 Anonymous
  {{{
73 1 Anonymous
   /sbin/chkconfig  --add gmetad
74 1 Anonymous
   /sbin/chkconfig  gmetad  on
75 1 Anonymous
  }}}
76 1 Anonymous
 * Start the Ganglia Meta Daemon:
77 1 Anonymous
  {{{
78 1 Anonymous
   /sbin/service  gmetad  start
79 1 Anonymous
  }}}
80 1 Anonymous
 
81 1 Anonymous
 * If the pie chart diagrams do not show up, you have to install the ''php-gd'' packages.
82 1 Anonymous
83 1 Anonymous
  
84 1 Anonymous
== Further Customisation ==
85 1 Anonymous
In order to display more fine-grained time intervals, edit the following files in ''/usr/local/ganglia/html/'':
86 1 Anonymous
 * '''header.php'''
87 1 Anonymous
 {{{
88 1 Anonymous
  if (!$physical) {
89 1 Anonymous
   $context_ranges[]="10 minutes";
90 1 Anonymous
   $context_ranges[]="20 minutes";
91 1 Anonymous
   $context_ranges[]="30 minutes";
92 1 Anonymous
   $context_ranges[]="1 hour";
93 1 Anonymous
   $context_ranges[]="2 hours";
94 1 Anonymous
   $context_ranges[]="4 hours";
95 1 Anonymous
   $context_ranges[]="8 hours";
96 1 Anonymous
   $context_ranges[]="12 hours";
97 1 Anonymous
   $context_ranges[]="1 day";
98 1 Anonymous
   $context_ranges[]="2 days";
99 1 Anonymous
   $context_ranges[]="week";
100 1 Anonymous
   $context_ranges[]="month";
101 1 Anonymous
   $context_ranges[]="year";
102 1 Anonymous
 }}}
103 1 Anonymous
104 1 Anonymous
 * '''get_context.php'''
105 1 Anonymous
 {{{
106 1 Anonymous
  switch ($range) {
107 1 Anonymous
   case "10 minutes":   $start = -600; break;
108 1 Anonymous
   case "20 minutes":   $start = -1200; break;
109 1 Anonymous
   case "30 minutes":   $start = -1800; break;
110 1 Anonymous
   case "1 hour":       $start = -3600; break;
111 1 Anonymous
   case "2 hours":      $start = -7200; break;
112 1 Anonymous
   case "4 hours":      $start = -14400; break;
113 1 Anonymous
   case "8 hours":      $start = -28800; break;
114 1 Anonymous
   case "12 hours":     $start = -43200; break;
115 1 Anonymous
   case "1 day":        $start = -86400; break;
116 1 Anonymous
   case "2 days":       $start = -172800; break;
117 1 Anonymous
   case "week":         $start = -604800; break;
118 1 Anonymous
   case "month":        $start = -2419200; break;
119 1 Anonymous
   case "year":         $start = -31449600; break;
120 1 Anonymous
 }}}