Ganglia » History » Version 2

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

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