Ganglia structure and Installation

Source: Internet
Author: User

After a few days of hadoop testing and testing, it is difficult to monitor the cluster status. For example, you can only view the cpu attribute of datanode when running a large file. Then I checked it online and found a ganglia management tool and decided to install it. below is my installation record, I am using yum installation (mainly because there are too many associated files to install ):

I. First, let's take a look at the structure of ganglia:

As you can see, ganglia can display the cluster status through the web, which is what we want. The basic information can be understood as: the server needs to install a tool named GMETAD, the GMOND tool needs to be installed on the node. This information helps us better understand the installation of ganglia.
 
Ii. Update yum
 
Ganglia has many dependency packages, but most of them are automatically installed after linux is installed. The following are several:
 
Zlib-1.2.2-4
Libpng-1.2.1-6
Freetype2-2.1.7-2
Libart_lgpl-2.3.16-1
Rrdtool-1.2.11
 
Perl
 
Here we mainly install rrdtool. For more convenient installation, we will update yum and copy several files to the ganglia server and client/etc/yum. repos. d/directory, which will be placed in the 115 Network Disk,
 
-Rw-r -- 1 root 2188 Dec 15 10:18 CentOS-Base.repo
-Rw-r -- 1 root 1931 Dec 15 CentOS-Base.repo.bak
-Rw-r -- 1 root 954 Dec 14 10:12 epel. repo
-Rw-r -- 1 root 1010 Dec 15 10:15 ius. repo
-Rw-r -- 1 root 633 Dec 15 10:18 remi. repo
-Rw-r -- 1 root 561 Mar 10 2010 rhel-debuginfo.repo
-Rw-r -- 1 root 852 Dec 15 10:18 webtatic. repo
 
If the RPM-GPG-KEY-EPEL file is missing, you also need to import the file RPM-GPG-KEY-EPEL and enter: wget failed.
 
Since I have already installed it on 149, I copied it directly:
 
Scp RPM-GPG-KEY-EPEL root@192.168.30.148:/etc/pki/rpm-gpg/
 
 
 
Scp-r/etc/yum. repos. d/* root@192.168.30.148:/etc/yum. repos. d/
 
 
 
3. Install the server
After the copy, yum search ganglia to check whether the following information is displayed:
 
========================================================== ====================== Matched: ganglia ================================================= ============================
 
Ganglia. i386: Ganglia Distributed Monitoring System
 
Ganglia-devel.i386: Ganglia Library.
 
Ganglia-gmetad.i386: Ganglia Metadata collection daemon
 
Ganglia-gmond.i386: Ganglia Monitoring daemon.
 
Ganglia-web.i386: Ganglia Web Frontend
 
 
 
You can see that gmetad. i386 is to be installed on the server, gmond. i386 is the file to be installed on the client, and web is used for web display on the server.
 
First install the server:
 
Ganglia-gmetad.i386
 
 
View the installed ganglia package
 
Rpm-qa | grep ganglia
 
 
 
Ganglia-3.0.7-1.el5
 
Ganglia-web-3.0.7-1.el5
 
Ganglia-gmetad-3.0.7-1.el5
 
View the installation path:
 
Rpm-SQL ganglia-gmetad-3.0.7-1.el5
 
 
 
/Etc/gmetad. conf
 
/Etc/rc. d/init. d/gmetad
 
/Usr/sbin/gmetad
 
/Usr/share/man/man1/gmetad.1.gz
 
/Var/lib/ganglia
 
/Var/lib/ganglia/rrds
 
Configuration file:
 
Vim/etc/gmetad. conf
 
Data_source "hadoop" localhost hadoop148 hadoop150 # "hadoop" is the service name, which is required for node configuration. The following two are the node ip addresses.
 
Start gmetad:
 
Service gmetad start
 
Starting GANGLIA gmetad: [OK]
 
Verify whether startup is successful:
 
Telnet local host 8651
 
 
Iv. Client installation:
 
Yum install ganglia-gmond.i386
 
[Root @ hadoop148 yum. repos. d] # rpm-qa | grep ganglia
 
Ganglia-gmond-3.0.7-1.el5
 
 
Check the installation path here:
 
[Root @ hadoop148 yum. repos. d] # rpm-ql ganglia-gmond-3.0.7-1.el5
 
/Etc/gmond. conf
 
/Etc/rc. d/init. d/gmond
 
/Usr/bin/gmetric
 
/Usr/bin/gstat
 
/Usr/sbin/gmond
 
/Usr/share/man/man1/gmetric.1.gz
 
/Usr/share/man/man1/gmond.1.gz
 
/Usr/share/man/man1/gstat.1.gz
 
/Usr/share/man/man5/gmond.conf.5.gz
 
Configure/etc/gmond. conf:
 
Cluster {
 
Name = "hadoop" # changed to the previous service name
 
Owner = "unspecified"
 
Latlong = "unspecified"
 
Url = "unspecified"
 
}
 
Start the service:
 
[Root @ hadoop148 yum. repos. d] # service gmond start
 
Starting GANGLIA gmond: [OK]
 
 
The method for installing the web version is the same, but apache support needs to be installed. I will not introduce it in detail here. Then I will write a separate apache configuration article to show the ganglia web interface below:
 
Reprinted with the source: http://blog.csdn.net/lengzijian/article/details/7102320,
 


 

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.