Tuesday, January 24, 2012

Adding a node to an existing Ganglia setup

This is a followup to the earlier posting where I installed and configured Ganglia to monitor 2 nodes. In this posting I try and add another node(isvpx3) to that setup.

[root@isvx3 ~]# rpm -qa | grep ganglia
[root@isvx3 ~]# rpm -qa | grep php
[root@isvx3 ~]#


[root@isvx3 rhn]# 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@isvx3 rhn]#

Changed https to http in the /etc/sysconfig/rhn/up2date file:

serverURL[comment]=Remote server URL
serverURL=https://rtp.rhn.linux.ibm.com/XMLRPC
to
serverURL[comment]=Remote server URL
serverURL=http://rtp.rhn.linux.ibm.com/XMLRPC

That helped get rid of the "The SSL certificate failed verification." error, but yum install ganglia still did not go through as shown below.


[root@isvx3 ~]# 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
No package ganglia available.
Nothing to do
[root@isvx3 ~]#

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

[root@isvx3 ganglia]# wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
--2012-01-24 14:16:58--  http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
Resolving download.fedoraproject.org... 66.35.62.166, 209.132.181.16, 140.211.169.197, ...
Connecting to download.fedoraproject.org|66.35.62.166|:80... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: http://mirrors.rit.edu/epel/5/i386/epel-release-5-4.noarch.rpm [following]
--2012-01-24 14:16:58--  http://mirrors.rit.edu/epel/5/i386/epel-release-5-4.noarch.rpm
Resolving mirrors.rit.edu... 129.21.171.98
Connecting to mirrors.rit.edu|129.21.171.98|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12232 (12K) [application/x-rpm]
Saving to: `epel-release-5-4.noarch.rpm'

100%[======================================>] 12,232      62.2K/s   in 0.2s

2012-01-24 14:16:59 (62.2 KB/s) - `epel-release-5-4.noarch.rpm' saved [12232/12232]

[root@isvx3 ganglia]#
[root@isvx3 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@isvx3 ganglia]#

Was able to install ganglia using yum install after that:

[root@isvx3 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.

epel                                                     | 3.7 kB     00:00
epel/primary_db                                          | 3.7 MB     00:12
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                                           155 kB/s | 182 kB     00:01
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!
[root@isvx3 ganglia]#

Next I install ganglia-gmond using yum.

[root@isvx3 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@isvx3 ganglia]#

Edit the /etc/gmond.conf file as follows:

cluster {
  name = "unspecified"
  owner = "unspecified"
  latlong = "unspecified"
  url = "unspecified"
}

to

cluster {
  name = "my servers"
  owner = "unspecified"
  latlong = "unspecified"
  url = "unspecified"
}


also, change the following in the /etc/gmond.conf

udp_send_channel {
  mcast_join = 239.2.11.71
  port = 8649
  ttl = 1
}

to

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

also, change the following in the /etc/gmond.conf

/* You can specify as many udp_recv_channels as you like as well. */
udp_recv_channel {
  mcast_join = 239.2.11.71
  port = 8649
  bind = 239.2.11.71
}

/* You can specify as many tcp_accept_channels as you like to share
   an xml description of the state of the cluster */
tcp_accept_channel {
  port = 8649
}


to

/* udp_recv_channel {
}
tcp_accept_channel {
} */

Start the gmond daemon

[root@isvx3 ganglia]# service gmond start
Starting GANGLIA gmond:                                    [  OK  ]

You can see the Hosts up count has increased by 1. Also you can see the name of the newly added host in the drop down menu for "my servers"

2 comments:

Jasem Elayeb said...

i dont know if this steps will work if you have multiple clusters and one ganglia host.
as i know you will have to mention your new host into the main ganglia host under gmetad.conf

erectile dysfunction drugs said...

Generally I don't read post on blogs, but I would like to say that this write-up very forced me to take a look at and do so! Your writing taste has been surprised me. Thank you, quite nice article.