Ganglia installation on CentOS

I am assuming that we are going to implement it on CentOS/RHEL box. And Ganglia doesn’t come with those. So we need to get the software through EPEL reposity or alternatively from here :

http://rpmfind.net/linux/rpm2html/search.php?query=ganglia-gmetad

Or if we are inclined get it installed from the source then we need to look here for tar [file: http://ganglia.info/?page_id=66%5D

Step 1:

Installing Ganglia:

[bhaskar@Amazon-instances ~]$ sudo yum install ganglia ganglia-gmetad ganglia-gmond ganglia-web
addons | 951 B 00:00
base | 2.1 kB 00:00
centosplus | 1.9 kB 00:00
epel | 3.7 kB 00:00
epel/primary_db | 3.7 MB 00:00
extras | 2.1 kB 00:00
rightscale-epel | 951 B 00:00
updates | 1.9 kB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ganglia.i386 0:3.0.7-1.el5 set to be updated
---> Package ganglia.x86_64 0:3.0.7-1.el5 set to be updated
---> Package ganglia-gmetad.x86_64 0:3.0.7-1.el5 set to be updated
---> Package ganglia-gmond.x86_64 0:3.0.7-1.el5 set to be updated
---> Package ganglia-web.x86_64 0:3.0.7-1.el5 set to be updated
--> Processing Dependency: php-gd for package: ganglia-web
--> Running transaction check
---> Package php-gd.x86_64 0:5.2.4-RightScale set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Installing:
ganglia i386 3.0.7-1.el5 epel 91 k
ganglia x86_64 3.0.7-1.el5 epel 91 k
ganglia-gmetad x86_64 3.0.7-1.el5 epel 85 k
ganglia-gmond x86_64 3.0.7-1.el5 epel 220 k
ganglia-web x86_64 3.0.7-1.el5 epel 119 k
Installing for dependencies:
php-gd x86_64 5.2.4-RightScale rightscale-epel 341 k

Transaction Summary
=============================================================================================================================
Install 6 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 947 k
Is this ok [y/N]:
Downloading Packages:
(1/6): ganglia-gmetad-3.0.7-1.el5.x86_64.rpm | 85 kB 00:00
(2/6): ganglia-3.0.7-1.el5.i386.rpm | 91 kB 00:00
(3/6): ganglia-3.0.7-1.el5.x86_64.rpm | 91 kB 00:00
(4/6): ganglia-web-3.0.7-1.el5.x86_64.rpm | 119 kB 00:00
(5/6): ganglia-gmond-3.0.7-1.el5.x86_64.rpm | 220 kB 00:00
(6/6): php-gd-5.2.4-RightScale.x86_64.rpm | 341 kB 00:00
-----------------------------------------------------------------------------------------------------------------------------
Total 8.9 MB/s | 947 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ganglia 1/6
Installing : ganglia-gmetad 2/6
Installing : php-gd 3/6
Installing : ganglia 4/6
Installing : ganglia-web 5/6
Installing : ganglia-gmond 6/6

Installed:
ganglia.i386 0:3.0.7-1.el5 ganglia.x86_64 0:3.0.7-1.el5 ganglia-gmetad.x86_64 0:3.0.7-1.el5
ganglia-gmond.x86_64 0:3.0.7-1.el5 ganglia-web.x86_64 0:3.0.7-1.el5

Dependency Installed:
php-gd.x86_64 0:5.2.4-RightScale

Complete!

Step 2:

Setting password for user ganglia:

[bhaskar@Amazon-instances ~]$ sudo /usr/bin/passwd ganglia
Changing password for user ganglia.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

Step 3:

Starting gmond daemon at boot:

[bhaskar@Amazon-instances ~]$ sudo /sbin/chkconfig --levels 235 gmond on

Step 4:

Started gmond daemon :

[bhaskar@Amazon-instances ~]$ sudo /sbin/service gmond start
Starting GANGLIA gmond: [ OK ]


step 5:

configure this file :

[bhaskar@Amazon-instances ~]$ sudo vim /etc/gmetad.conf

step 6:
configure this daemon too:

[bhaskar@Amazon-instances ~]$ sudo /sbin/chkconfig --levels 235 gmetad on

step 7:
Starting gmetad daemon:

[bhaskar@Amazon-instances ~]$ sudo /sbin/service gmetad start
Starting GANGLIA gmetad: [ OK ]

Step 8:
Installing gmond on different node:

[bhaskarc@Amazon-instances ~]$ puppet-nagios
Last login: Thu Apr 28 05:08:20 2011 from 10.111.58.145
[bhaskarc@Amazon-instances ~]$ sudo yum install ganglia-gmond
Loaded plugins: fastestmirror
Determining fastest mirrors
* addons: mirror.trouble-free.net
* base: mirror.trouble-free.net
* epel: mirror.cogentco.com
* extras: mirror.ash.fastserv.com
* updates: centos.mirror.nac.net
addons | 951 B 00:00
base | 2.1 kB 00:00
base/primary_db | 2.2 MB 00:00
epel | 3.7 kB 00:00
epel/primary_db | 3.7 MB 00:00
extras | 2.1 kB 00:00
updates | 1.9 kB 00:00
updates/primary_db | 400 kB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ganglia-gmond.x86_64 0:3.0.7-1.el5 set to be updated
--> Processing Dependency: ganglia = 3.0.7-1.el5 for package: ganglia-gmond
--> Running transaction check
---> Package ganglia.x86_64 0:3.0.7-1.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Installing:
ganglia-gmond x86_64 3.0.7-1.el5 epel 220 k
Installing for dependencies:
ganglia x86_64 3.0.7-1.el5 epel 91 k

Transaction Summary
=============================================================================================================================
Install 2 Package(s)
Upgrade 0 Package(s)

Total download size: 312 k
Is this ok [y/N]:
Downloading Packages:
(1/2): ganglia-3.0.7-1.el5.x86_64.rpm | 91 kB 00:00
(2/2): ganglia-gmond-3.0.7-1.el5.x86_64.rpm | 220 kB 00:00
-----------------------------------------------------------------------------------------------------------------------------
Total 678 kB/s | 312 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : ganglia 1/2
Installing : ganglia-gmond 2/2

Installed:
ganglia-gmond.x86_64 0:3.0.7-1.el5

Dependency Installed:
ganglia.x86_64 0:3.0.7-1.el5

Complete!

Step 9:
Run it different level:

[bhaskar@Amazon-instances ~]$ sudo /sbin/chkconfig --levels 235 gmond on

Step 10:

Come back to the main machine ,where ganglia install and do the following:

Change the ownership of ganglia directory to ganglia user and group:

[bhaskar@Amazon-instances html]$ sudo chown -R ganglia:ganglia ganglia/

Add ganglia user to the apache group:

[bhaskar@Amazon-instances html]$ sudo /usr/sbin/usermod -G apache -a ganglia

Check the ganglia id:

[bhaskar@Amazon-instances html]$ id ganglia

uid=102(ganglia) gid=103(ganglia) groups=48(apache),103(ganglia)

[bhaskarc@Amazon-instances html]$ sudo chown -R ganglia:ganglia ganglia/
[bhaskar@Amazon-instances html]$ sudo /usr/sbin/usermod -G apache -a ganglia
[bhaskar@Amazon-instances html]$ id ganglia
uid=102(ganglia) gid=103(ganglia) groups=48(apache),103(ganglia)


Step 11:

You can view ganglia with this url:

http://Amazon-instances.amazonaws.com/ganglia/

It should show you the graph.

Hope this will help.

Cheers!
Bhaskar

About these ads

About unixbhaskar
Sr Consultant GNU/Linux and Networking

6 Responses to Ganglia installation on CentOS

  1. Pingback: Links 10/5/2011: More on SimplyMEPIS 11, Ubuntu Hype | Techrights

  2. janaki says:

    Hi Bhaskar,

    Thanks for the guideleiness for installing Ganglia on CentOS. I got the graphs and it is working well. Now I want to write user defined metrics. Please can you help me in that…and also I am trying to integrate ganglia with eucalyptus cluster. I am struck with that.

    Thanks in advance
    Janaki

  3. Pingback: CentOS5 couldn’t load file “/usr/lib/tls/libtls1.6.so”: /usr/lib/tls/libtls1.6.so: cannot open shared object file: No such file or directory | Linux Admins

  4. avinash says:

    hi
    how to install ganglia through puppetmaster in clients

  5. Mohammed Irshad says:

    Hi Bhaskar,

    I am new to linux or GNU or centos. I did follow all your steps and everything went well. But at the end, I am having following your Step 11:

    You can view ganglia with this url:

    http://Amazon-instances.amazonaws.com/ganglia/

    I tried with my machine IP like in LAN, http://10.30.15.21/ganglia but it didn’t work. I am sure I am missing something.

    One more thing to let you know that; I didn’t do; Step 8:
    Installing gmond on different node:

    I just want to see it first. Please help.

    • unixbhaskar says:

      That’s not your fault,.,it was my internal server so I can masked that. you have to use your install url. plus gmond is necessary,

      -Bhaskar

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 103 other followers

%d bloggers like this: