Tuesday Jul 23, 2013

Ganglia on Solaris 11.1

Here are some notes that I took while building Ganglia Core 3.6.0 and Ganglia Web 3.5.7 with Solaris Studio 12.3 and installing on Solaris 11.1. These notes are only intended augment (not replace) other Ganglia install guides.

1) Add a ganglia user to build with (This is an optional step, you may build as any user, gmond will run as root )

    # useradd -d localhost:/export/home/ganglia -m ganglia
    # passwd ganglia
    # usermod -R root ganglia
    # echo "ganglia ALL=(ALL) ALL" > /etc/sudoers.d/ganglia
    # chmod 440 /etc/sudoers.d/ganglia
# su - ganglia



2) These packages are needed:

    $ sudo pkg install system/header gperf glibmm apache-22 php-53 apache-php53 apr-util-13 libconfuse rrdtool
$ sudo svcadm enable apache22

3) Download and unpack:

$ gzip -dc ganglia-3.6.0.tar.gz | tar xvf -

$ gzip -dc ganglia-web-3.5.7.tar.gz | tar xvf -

$ cd ganglia-3.6.0


4) Compiler error when building libgmond.c: "default_conf.h", line 75: invalid directive". In lib/default_conf.h, Removed the 3 lines with a '#' character.

udp_recv_channel {\n\
mcast_join = 239.2.11.71\n\
port = 8649\n\
  bind = 239.2.11.71\n\
retry_bind = true\n\
  # Size of the UDP buffer. If you are handling lots of metrics you really\n\
  # should bump it up to e.g. 10MB or even higher.\n\
# buffer = 10485760\n\
}\n\

5) Compiler error: "data_thread.c", line 143: undefined symbol: FIONREAD. In gmetad/data_thread.c, added:

#include <sys/filio.h>

6) Runtime error: "Cannot load /usr/local/lib/ganglia/modcpu.so metric module: ld.so.1: gmond: fatal: relocation error: file /usr/local/lib/ganglia/modcpu.so: symbol cpu_steal_func: referenced symbol not found". Stub added to the bottom of ./libmetrics/solaris/metrics.c

g_val_t
cpu_steal_func ( void )
{
  static g_val_t val=0;
return val;
}


7) Build Ganglia Core 3.6.0 without gmetad for all of the machines in the cluster, except a primary node:

$ export PATH=/usr/local/bin:/usr/local/sbin:$PATH
$ export LD_LIBRARY_PATH=/usr/local/lib:/usr/apr/1.3/lib
$ export PKG_CONFIG_PATH=/usr/apr/1.3/lib/pkgconfig

$ cd ganglia-3.6.0

$ ./configure

$ make

8) Install Ganglia Core 3.6.0 (on all machines in the cluster):

$ sudo make install
$ gmond --default_config > /tmp/gmond.conf
$ sudo cp /tmp/gmond.conf /usr/local/etc/gmond.conf

$ sudo vi /usr/local/etc/gmond.conf  # (Remove these lines)

metric {
   name = "cpu_steal"
value_threshold = "1.0"
  title = "CPU steal"
}

9) Start gmond as root (on all machines in the cluster):

# export PATH=/usr/local/bin:/usr/local/sbin:$PATH
# export LD_LIBRARY_PATH=/usr/local/lib:/usr/apr/1.3/lib
# gmond

7) Build Ganglia Core 3.6.0 with gmetad for the primary node:

    $ export PATH=/usr/local/bin:/usr/local/sbin:$PATH
    $ export LD_LIBRARY_PATH=/usr/local/lib:/usr/apr/1.3/lib
    $ export PKG_CONFIG_PATH=/usr/apr/1.3/lib/pkgconfig

    $ cd ganglia-3.6.0

    $ ./configure --with-gmetad

    $ make


10) Install ganglia-web-3.5.7 (on a primary server)

    $ cd ganglia-web-3.5.7

    $ vi Makefile # Set these variables

    GDESTDIR = /var/apache2/2.2/htdocs/
    APACHE_USER =  webservd


    $ sudo make install


    $ sudo mkdir -p /var/lib/ganglia/rrds
$ sudo chown -Rh nobody:nobody /var/lib/ganglia

11) Start gmond and gmetad on the primary node


12) You need to remove the "It works" page so that index.php is the default

    # sudo rm /var/apache2/2.2/htdocs/index.html

Now you can visit the primary node with a web browser.

About

user12620111

Search

Archives
« July 2013 »
SunMonTueWedThuFriSat
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
24
25
26
27
28
29
30
31
   
       
Today