Tuesday, January 24, 2012

Install and Configure Ganglia on Red Hat 4.1.2-50

I wanted to install and play around with ganglia on my RedHat 4.1.2-50 Linux box. I found the a really good HOW TO:
http://acidborg.wordpress.com/2010/10/08/how-to-install-and-configure-ganglia-on-red-hat-enterprise-linux-5/

When I tried to do "yum install ganglia" I got the below message.

[root@isvx7 ganglia]# yum install ganglia
Loaded plugins: rhnplugin, security
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 157, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 187, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 665, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 254, in _getConfig
    self.plugins.run('init')
  File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 179, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/rhnplugin.py", line 121, in init_hook
    login_info = up2dateAuth.getLoginInfo()
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 219, in getLoginInfo
    login()
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 186, in login
    li = server.up2date.login(systemId)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 64, in __call__
    raise up2dateErrors.SSLCertificateVerifyFailedError()
up2date_client.up2dateErrors.SSLCertificateVerifyFailedError: The SSL certificate failed verification.
[root@isvx7 ganglia]#

As the above failed, I  went onto to install the Extra Packages for Enterprise Linux (EPEL)  rpm as follows


[root@isvx4 ganglia]# wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
--2012-01-23 18:22:37--  http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
Resolving download.fedoraproject.org... 66.35.62.166, 152.19.134.146, 209.132.181.16, ...
Connecting to download.fedoraproject.org|66.35.62.166|:80... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: http://mirror.steadfast.net/epel/5/i386/epel-release-5-4.noarch.rpm [following]
--2012-01-23 18:22:38--  http://mirror.steadfast.net/epel/5/i386/epel-release-5-4.noarch.rpm
Resolving mirror.steadfast.net... 208.100.4.53, 2607:f128:1:3::2
Connecting to mirror.steadfast.net|208.100.4.53|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12232 (12K) [application/x-redhat-package-manager]
Saving to: `epel-release-5-4.noarch.rpm'

100%[======================================>] 12,232      --.-K/s   in 0.1s

2012-01-23 18:22:38 (80.9 KB/s) - `epel-release-5-4.noarch.rpm' saved [12232/12232]

[root@isvx4 ganglia]# ls
epel-release-5-4.noarch.rpm
[root@isvx4 ganglia]# rpm -i epel-release-5-4.noarch.rpm
warning: epel-release-5-4.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
[root@isvx4 ganglia]#

Some blogs say to check the data and time of the host doing a "yum install", and that it could cause the error message "up2date_client.up2dateErrors.SSLCertificateVerifyFailedError: The SSL certificate failed verification."

In my case the date and time were fine, and that was not the cause of the problem.

I found a workaround to the issue which says, to edit /etc/sysconfig/rhn/up2date and change serverURL=http://... instead of https.

It fixed the "up2date_client.up2dateErrors.SSLCertificateVerifyFailedError: The SSL certificate failed verification." issue, and I was able to install ganglia using "yum install".


[root@isvx7 ganglia]# yum install ganglia
Loaded plugins: rhnplugin, security
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
Error communicating with server. The message was:

Error Message:
        Please run rhn_register as root on this client
Error Class Code: 9
Error Class Info: Invalid System Credentials.
Explanation:
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.

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
--> 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

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

Total download size: 182 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): ganglia-3.0.7-1.el5.i386.rpm                      |  91 kB     00:00
(2/2): ganglia-3.0.7-1.el5.x86_64.rpm                    |  91 kB     00:00
--------------------------------------------------------------------------------
Total                                            38 kB/s | 182 kB     00:04
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6
epel/gpgkey                                              | 1.7 kB     00:00
Importing GPG key 0x217521F6 "Fedora EPEL <epel@fedoraproject.org>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : ganglia                                                  1/2
  Installing     : ganglia                                                  2/2

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

Complete!



In addition to that, on the node I wanted to monitor I also installed ganglia-gmond

[root@isvx7 ganglia]# yum install ganglia-gmond
Loaded plugins: rhnplugin, security
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
Error communicating with server. The message was:

Error Message:
        Please run rhn_register as root on this client
Error Class Code: 9
Error Class Info: Invalid System Credentials.
Explanation:
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.

Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ganglia-gmond.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

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

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

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

Complete!
[root@isvx4 ganglia]#

Use the Gabglia Status Tool(gstat) and tried to see if the thing were working fine.

[root@isvx7 lib]# gstat -a
CLUSTER INFORMATION
       Name: my servers
      Hosts: 2
Gexec Hosts: 0
 Dead Hosts: 0
  Localtime: Mon Jan 23 20:23:05 2012

CLUSTER HOSTS
Hostname                     LOAD                       CPU              Gexec
 CPUs (Procs/Total) [     1,     5, 15min] [  User,  Nice, System, Idle, Wio]

isvx4.storage.tucson.ibm.com
   24 (    0/  873) [  0.07,  0.03,  0.01] [   0.0,   0.0,   0.1,  99.9,   0.0] OFF
isvx7.storage.tucson.ibm.com
   24 (    0/ 1068) [  2.07,  2.11,  2.27] [   0.0,   0.0,   0.1,  95.1,   4.8] OFF
[root@isvx7 lib]#

http://isvx7.storage.tucson.ibm.com/ganglia still didn't work for me as it did need some more work.

I then downloaded the ganglia-web-3.0.7-1.el5 RPM for i386 rpm
from http://rpmfind.net/linux/RPM/epel/5/i386/ganglia-web-3.0.7-1.el5.i386.html

I also installed php as I did not have php on my Liux host

[root@isvx7 php]# rpm -qa php
[root@isvx7 php]#


[root@isvx7 ganglia]# wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
--2012-01-23 23:11:12--  http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
Resolving rpms.famillecollet.com... 88.191.74.232, 2a01:e0b:1:74:2e0:f4ff:fe1b:b827
Connecting to rpms.famillecollet.com|88.191.74.232|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4974 (4.9K) [application/x-rpm]
Saving to: `remi-release-5.rpm'

100%[======================================================================================>] 4,974       26.9K/s   in 0.2s

2012-01-23 23:11:13 (26.9 KB/s) - `remi-release-5.rpm' saved [4974/4974]


[root@isvx7 ganglia]# yum --enablerepo=remi install php
Loaded plugins: rhnplugin, security
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
Error communicating with server. The message was:

Error Message:
        Please run rhn_register as root on this client
Error Class Code: 9
Error Class Info: Invalid System Credentials.
Explanation:
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.

Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.3.9-1.el5.remi set to be updated
--> Processing Dependency: php-cli = 5.3.9-1.el5.remi for package: php
--> Processing Dependency: php-common = 5.3.9-1.el5.remi for package: php
--> Processing Dependency: libedit.so.0()(64bit) for package: php
--> Running transaction check
---> Package libedit.x86_64 0:2.11-2.20080712cvs.el5 set to be updated
---> Package php-cli.x86_64 0:5.3.9-1.el5.remi set to be updated
---> Package php-common.x86_64 0:5.3.9-1.el5.remi set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================
 Package                      Arch                     Version                                     Repository              Size
================================================================================================================================
Installing:
 php                          x86_64                   5.3.9-1.el5.remi                            remi                   2.8 M
Installing for dependencies:
 libedit                      x86_64                   2.11-2.20080712cvs.el5                      epel                    80 k
 php-cli                      x86_64                   5.3.9-1.el5.remi                            remi                   2.6 M
 php-common                   x86_64                   5.3.9-1.el5.remi                            remi                   997 k

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

Total download size: 6.4 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): libedit-2.11-2.20080712cvs.el5.x86_64.rpm                                                         |  80 kB     00:00
(2/4): php-common-5.3.9-1.el5.remi.x86_64.rpm                                                            | 997 kB     00:01
(3/4): php-cli-5.3.9-1.el5.remi.x86_64.rpm                                                               | 2.6 MB     00:03
(4/4): php-5.3.9-1.el5.remi.x86_64.rpm                                                                   | 2.8 MB     00:03
--------------------------------------------------------------------------------------------------------------------------------
Total                                                                                           582 kB/s | 6.4 MB     00:11
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 00f97f56
remi/gpgkey                                                                                              | 1.3 kB     00:00
Importing GPG key 0x00F97F56 "Remi Collet <RPMS@FamilleCollet.com>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction

WARNING : These php-* RPM are not official Fedora/Redhat build and
overrides the official ones. Don't file bugs on Fedora Project nor Redhat.

Use dedicated forums http://forums.famillecollet.com/

  Installing     : php-common                                                                                               1/4
  Installing     : libedit                                                                                                  2/4
  Installing     : php-cli                                                                                                  3/4
  Installing     : php                                                                                                      4/4

Installed:
  php.x86_64 0:5.3.9-1.el5.remi

Dependency Installed:
  libedit.x86_64 0:2.11-2.20080712cvs.el5      php-cli.x86_64 0:5.3.9-1.el5.remi      php-common.x86_64 0:5.3.9-1.el5.remi

Complete!
[root@isvx7 ganglia]#
[root@isvx7 ganglia]# php -v
PHP 5.3.9 (cli) (built: Jan 10 2012 20:04:35)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
[root@isvx7 ganglia]#

Then installed php-gd as follows:

[root@isvx7 rhn]# yum --enablerepo=remi install php-gd
Loaded plugins: rhnplugin, security
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
Error communicating with server. The message was:

Error Message:
        Please run rhn_register as root on this client
Error Class Code: 9
Error Class Info: Invalid System Credentials.
Explanation:
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.

remi                                                     | 2.5 kB     00:00
remi/primary_db                                          | 266 kB     00:01
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-gd.x86_64 0:5.3.9-1.el5.remi set to be updated
--> Processing Dependency: libt1.so.5()(64bit) for package: php-gd
--> Running transaction check
---> Package t1lib.x86_64 0:5.1.1-7.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch            Version                    Repository     Size
================================================================================
Installing:
 php-gd          x86_64          5.3.9-1.el5.remi           remi          209 k
Installing for dependencies:
 t1lib           x86_64          5.1.1-7.el5                epel          208 k

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

Total download size: 417 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): t1lib-5.1.1-7.el5.x86_64.rpm                      | 208 kB     00:00
(2/2): php-gd-5.3.9-1.el5.remi.x86_64.rpm                | 209 kB     00:01
--------------------------------------------------------------------------------
Total                                           108 kB/s | 417 kB     00:03
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : t1lib                                                    1/2
  Installing     : php-gd                                                   2/2

Installed:
  php-gd.x86_64 0:5.3.9-1.el5.remi

Dependency Installed:
  t1lib.x86_64 0:5.1.1-7.el5

Complete!
[root@isvx7 rhn]#
Installed the ganglia-web rpm, and restarted the httpd.

[root@isvx7 ganglia]# rpm -i ganglia-web-3.0.7-1.el5.x86_64.rpm
[root@isvx7 ganglia]#
[root@isvx7 ganglia]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@isvx7 ganglia]#

The Cluster report graphs were available using a browser
http://isvx7.storage.tucson.ibm.com/ganglia/


Summary:
  • Ganglia rpm's that were installed on the collector server
[root@isvx7 ganglia]# rpm  -qa | grep ganglia
ganglia-gmond-3.0.7-1.el5
ganglia-3.0.7-1.el5
ganglia-gmetad-3.0.7-1.el5
ganglia-3.0.7-1.el5
ganglia-web-3.0.7-1.el5
[root@isvx7 ganglia]#
  • Ganglia rpm's that were installed on the node that was monitored.
[root@isvx4 ~]# rpm -qa | grep ganglia
ganglia-gmond-3.0.7-1.el5
ganglia-3.0.7-1.el5
ganglia-3.0.7-1.el5
  • On the collector node isvx7.storage.tucson.ibm.com edit /etc/gmetad.conf
data_source "my servers" 10 localhost

Also edit /etc/gmond.conf
cluster {
  name = "my servers"
  owner = "unspecified"
  latlong = "unspecified"
  url = "unspecified"
}


udp_send_channel {
  host = isvx7.storage.tucson.ibm.com
  port = 8649
}


udp_recv_channel {
  port = 8649
}


tcp_accept_channel {
  port = 8649
}
  • Restart the collector daemons:
[root@isvx7 php]# service gmetad restart
Shutting down GANGLIA gmetad:                              [  OK  ]
Starting GANGLIA gmetad:                                   [  OK  ]
[root@isvx7 php]# service gmetad restart
Shutting down GANGLIA gmetad:                              [  OK  ]
Starting GANGLIA gmetad:                                   [  OK  ]
[root@isvx7 php]#
  • On the node that was monitored isvx4.storage.tucson.ibm.com
Edit the file /etc/gmond.conf
cluster {
  name = "my servers"
  owner = "unspecified"
  latlong = "unspecified"
  url = "unspecified"
}


udp_send_channel {
  host = isvx7.storage.tucson.ibm.com
  port = 8649
}


/* udp_recv_channel {
}
tcp_accept_channel {
} */
  • Restart the gmond daemon:
[root@isvx4 ~]# service gmond restart
Shutting down GANGLIA gmond:                               [  OK  ]
Starting GANGLIA gmond:                                    [  OK  ]
  • Monitoring data was available at:
http://isvx7.storage.tucson.ibm.com/ganglia





No comments: