Install, configure, and test ganglia in centos 5.3

Source: Internet
Author: User
Tags rrdtool

Introduction: ganglia monitoring software is mainly used to monitor system performance, such as CPU, mem, hard disk utilization, I/O load, and network traffic, it is easy to see the working status of each node through the curve, which plays an important role in adjusting and allocating system resources and improving the overall system performance. Supports browser access, but does not monitor node hardware technical metrics. ganglia is a distributed monitoring system with two daemon clients: ganglia monitoringdaemon (gmond) and ganglia meta daemon (gmetad), and ganglia PHP webfrontend (web-based dynamic access. It is a Linux-based software that monitors the running performance of the system. The interface is beautiful, rich, and powerful. Rrdtool is a system storage and display time-series (that is, network bandwidth, temperature, number of people, server load, etc ).

1. My centos version:
[Root @ localhost ~] # Cat/etc/RedHat-release
Centos release 5.3 (final)

2. Update. wait patiently for a while because 42 packets are to be downloaded, about 59 MB.
[Root @ localhost ~] # Yum-y install Apr-devel Apr-util check-devel Cairo-devel pango-devel libxml2-devel rpmbuild glib2-devel ready-devel FreeType-devel fontconfig-devel gcc-C ++ expat-devel python-devel libxrender-devel

[Note] This step is unnecessary if centos release 5.3 (final) is used! I skipped this step during my experiment on another virtual machine and finally installed ganglia.

3. Installation
[Root @ localhost ~] # Rpm-uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
Retrieving http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
Warning:/var/tmp/rpm-xfer.lHvEIb: Header V3 DSA Signature: nokey, key ID 217521f6
Preparing... ######################################## ### [100%]
1: epel-release ##################################### ###### [100%]
[Explanation] This step is to install epel, which is created by the fedora community and provides high-quality, high-performance, and high-reliability software packages for RHEL and its derivative releases, such as centos and scientific Linux. With epel installed, you can install the software through Yum install package-name, just like on fedora.

[Root @ localhost ~] # Wget http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-1.2.23-1.el5.rf.i386.rpm
-- 03:19:10 -- http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-1.2.23-1.el5.rf.i386.rpm
Parsing host dag.wieers.com... 62.213.193.164
Connecting to dag.wieers.com | 62.213.193.164 |: 80... connected.
An HTTP request has been sent and is waiting for response... 302 found
Location: http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rrdtool-1.2.23-1.el5.rf.i386.rpm [following to new URL]
-- 03:19:11 -- http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rrdtool-1.2.23-1.el5.rf.i386.rpm
Parsing host rpmforge. Sw. Be... 85.13.226.40
Connecting to rpmforge. Sw. Be | 85.13.226.40 |: 80... connected.
An HTTP request has been sent and is waiting for response... 200 OK
Length: 955176 (933 K) [application/X-RPM]
Saving to: 'rdtool-1.2.23-1. el5.rf. i386.rpm'

100% [============================================== ========================================================== ============>] 955,176 68.0 K/s in 14 s

03:19:27 (68.4 kb/s)-'rdtool-1.2.23-1. el5.rf. i386.rpm 'saved [955176/955176]

[Root @ localhost ~] # Wget http://dag.wieers.com/rpm/packages/rrdtool/perl-rrdtool-1.2.23-1.el5.rf.i386.rpm
-- 03:19:31 -- http://dag.wieers.com/rpm/packages/rrdtool/perl-rrdtool-1.2.23-1.el5.rf.i386.rpm
Parsing host dag.wieers.com... 62.213.193.164
Connecting to dag.wieers.com | 62.213.193.164 |: 80... connected.
An HTTP request has been sent and is waiting for response... 302 found
Location: http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-rrdtool-1.2.23-1.el5.rf.i386.rpm [following to new URL]
-- 03:19:31 -- http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-rrdtool-1.2.23-1.el5.rf.i386.rpm
Parsing host rpmforge. Sw. Be... 85.13.226.40
Connecting to rpmforge. Sw. Be | 85.13.226.40 |: 80... connected.
An HTTP request has been sent and is waiting for response... 200 OK
Length: 49815 (49 K) [application/X-RPM]
Saving to: 'perl-rrdtool-1.2.23-1.el5.rf.i386.rpm'

100% [============================================== ========================================================== ============>] 49,815 36.2 K/s in 1.3 s

03:19:34 (36.2 kb/s)-'perl-rrdtool-1.2.23-1.el5.rf.i386.rpm 'saved [49815/49815]

[Root @ localhost ~] # Rpm-IVH perl-rrdtool-1.2.23-1.el5.rf.i386.rpm rrdtool-1.2.23-1.el5.rf.i386.rpm
Warning: perl-rrdtool-1.2.23-1.el5.rf.i386.rpm: Header V3 DSA Signature: nokey, key ID 6b8d79e6
Preparing... ######################################## ### [100%]
1: rrdtool ####################################### #### [50%]
2: perl-rrdtool ##################################### ###### [100%]

[Root @ localhost ~] # Yum install ganglia-gmetad ganglia-gmond ganglia-web httpd php apr Apr-util

4. Configuration
[Root @ localhost ~] # Mkdir-P/var/www/html/ganglia // create the ganglia folder in the home directory of the website to access Ganglia
[Root @ localhost ~] # Cp-A/usr/share/ganglia/*/var/www/html/ganglia // copy the ganglia website code to this directory
[Root @ localhost ~] # Mkdir-P/var/lib/ganglia/rrds // create the RRD file data collection directory
[Root @ localhost ~] # Chown nobody: Nobody/var/lib/ganglia/rrds // and modify the directory attributes. Both the owner and group are nobody.
[Root @ localhost ~] # Chkconfig -- add gmetad // submit the service to chkconfig.
[Root @ localhost ~] # Chkconfig -- add gmond // same as above
[Root @ localhost ~] # Chkconfig -- list gmetad // What is enabled and Disabled

[Root @ localhost ~] # Vi/etc/gmond. conf // modify the following fields
Cluster {
Name = "cluster name" // The Name Of The cluster you want to monitor. I changed it to name = "mycluster"
Owner = "unspecified"
Latlong = "unspecified"
Url = "unspecified"
}

[Root @ localhost ~] # Vi/etc/gmetad. conf

The IP address of the data_source "My cluster" localhost client, which is 127.0.0.1.

5. Test
Enable Ganglia
[Root @ localhost ~] # Service gmond start
[Root @ localhost ~] # Service gmetad start
[R [root @ localhost ~] # Service httpd restart

Enter http: // localhost/ganglia in IE to view the interface.


6. Problems:
Ganglia cannot be started normally. the following error occurs on the webpage: There was an error collecting ganglia data (127.0.0.1: 8652): fsockopen error: Connection refused

The solution found on the internet is: Service gmetad restart and restart gmetad.
[Root @ localhost ~] # Service gmetad status
Gmetad is dead, but subsys is locked
[Root @ localhost ~] # Service gmetad restart
Shutting down ganglia gmetad: [failed]
Starting ganglia gmetad: [OK]

Someone also said: You can change the owner of/usr/local/rrdtool to nobody (originally Root
[Root @ localhost ~] # Chown nobody/usr/local/rrdtool
I encountered this problem when I tried it on another computer. I tried both methods but did not solve it.


My solution:

Under the/var/www/html/ganglia directory, you can create a new Conf. PHP blank document, and then find the corresponding conf under/usr/share/ganglia. PHP, copy all the content to the new Conf. PHP.

If the above method still does not work, uninstall gmetad and reinstall it once. The details are as follows:

[Root @ localhost ~] # Yum remove ganglia-web ganglia-gmetad

Then

[Root @ localhost ~] # Yum install ganglia-Web

[Note] the above step will automatically install ganglia-gmetad, as if they are dependent on each other.

[Root @ localhost ~] # Service gmetad start

Conclusion: The installation sequence of ganglia-gmetad may be incorrect. You can install gmetad after installing and configuring other software.

I have not encountered any other problems. If you have any questions, please leave a message and contact me.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.