ganglia3.6.1 Installation Notes

Source: Internet
Author: User
Tags rrd rrdtool dns names

1. Experimental environment

Centos6.4

2, installation RRDtool

#安装ganglia相关包yum-y install apr-devel apr-util check-devel cairo-devel pango-devel libxml2-devel rpmbuild glib2-devel dbu S-devel freetype-devel fontconfig-devel gcc-c++ expat-devel python-devel libxrender-devel pcre pcre-devel
Tar xzf rrdtool-1.4.9.tar.gzcd rrdtool-1.4.9./configure--prefix=/opt/rrdtool-1.4.9--disable-perlmakemake Installln -s/opt/rrdtool-1.4.9/include/rrd.h/usr/include/rrd.hln-s/OPT/RRDTOOL-1.4.9/LIB/LIBRRD.A/USR/LIB/LIBRRD.A

3. Server Scripts

#!/bin/sh# installation confusetar zxf confuse-2.7.tar.gzcd confuse-2.7./configure cflags=-fpic - -DISABLE-NLS ;MAKE;MAKE INSTALL CD&NBSP, .... #安装gangliatar  zxf ganglia-3.6.1.tar.gzcd ganglia-3.6.1#server./configure --prefix=/opt/ modules/ganglia --with-static-modules --enable-gexec --enable-status --with-gmetad -- with-python=/usr --with-librrd=/opt/rrdtool-1.4.9 --with-libexpat=/usr --with-libconfuse=/usr/ Local --with-libpcre=/usr/local#client#./configure --prefix=/opt/modules/ganglia --enable-gexec  --enable-status --with-python=/usr --with-libconfuse=/usr/local --with-libexpat=/usr  --with-libpcre=/usrmake; make installcd gmetadcp gmetad.conf /opt/modules/ ganglia/etc/cp gmetad.init /etc/init.d/gmetadsed -i  "s/^gmetad=\/usr\/sbin\/gmetad/gmetad= \/opt\/modules\/ganglia\/sbin\/gmetad/g " /etc/init.d/gmetadchkconfig --add gmetad# My server has two network cards, eth1 use the public address, eth2 use the LAN address, monitoring server and the communication between the monitored server through the LAN address to reduce the load of the public network card, use the following command: (this IP can be in the/etc/ Modified in ganglia/gmond.conf) Ip route add 239.2.11.71 dev eth2service gmetad start

View service Gmetad Status

Error Gmetad dead but Subsys locked

View Tail-f/var/log/messages Discover the need to add directories and modify gmetad.conf files

(1) Mkdir-p/var/lib/ganglia/rrds (this directory is to configure the RRD data to save the file path, to the Web interface, this is fixed, preferably in a Web folder, and give the correct permissions, the default is the path, you can self-/opt/ Modify the value of the Rrd_rootdir variable in modules/ganglia/etc/gmetad.conf)

After the installation is complete httpd will have Apache this user, execute the following statement to the Rrds directory appropriate permissions

Chown-r Apache:apache/var/lib/ganglia/rrds

(2) Modify Setuid_username "Apache" in gmetad.conf the username and the RRD Data directory are required to match the owner

Note:

Gmetad.conf Modify the following:

Data_source "mycluster" 192.168.56.101:8649

Gridname "Mygrid"

Setuid_username "Apache"

Restart

Service Gmetad Restart

4. Client Script

#!/bin/shtar zxf confuse-2.7.tar.gzcd confuse-2.7./configure cflags=-fpic -- DISABLE-NLS ;MAKE;MAKE INSTALL CD&NBSP, .... tar zxf ganglia-3.6.1.tar.gzcd ganglia-3.6.1#server#./configure --prefix=/opt/modules/ ganglia --with-static-modules --enable-gexec --enable-status --with-gmetad -- with-python=/usr --with-librrd=/opt/rrdtool-1.4.5 --with-libexpat=/usr --with-libconfuse=/usr/ Local --with-libpcre=/usr/local#client don't need rrdtool./configure --prefix=/opt/modules/ganglia --. enable-gexec --enable-status --with-python=/usr --with-libconfuse=/usr/local -- With-libexpat=/usr --with-libpcre=/usrmake; make installcd gmond./gmond -t >  /opt/modules/ganglia/etc/gmond.confcp gmond.init /etc/init.d/gmondsed -i  "s/^gmond=\ /usr\/sbin\/gmond/gmond=\/opt\/modules\/ganglia\/sbin\/gmond/g " /etc/init.d/gmondchkconfig --add gmondip route add 239.2.11.71 dev eth2service gmond start 

Note: gmond.conf modified as follows (corresponding to gmetad.conf file modification):

Cluster {

Name = "mycluster"

Owner = "Unspecified"

Latlong = "Unspecified"

url = "Unspecified"

}

Udp_send_channel {

#bind_hostname = yes # highly recommended, soon to is default.

# This option tells Gmond to use a source address

# That's resolves to the machine ' s hostname. Without

# This, the metrics could appear to come from any

# interface and the DNS names associated with

# those IPs would be used to create the rrds.

Mcast_join = 239.2.11.71

Port = 8649

TTL = 1

}

Udp_recv_channel {

Mcast_join = 239.2.11.71

Port = 8649

bind = 239.2.11.71

Retry_bind = True

}

Tcp_accept_channel {

Port = 8649

# If you want to gzip XML output

Gzip_output = No

}

5, Ganglia-web Installation

Yum-y Install httpd PHP

Tar xzf ganglia-web-3.6.2cd ganglia-web-3.6.2

Modify the Makefile File

########################################################### User configurables:################################# ########################## location where Gweb should is installed to (excluding Conf, Dwoo dirs). Gdestdir =/var/www/html/ganglia# location where default Apache configuration should is installed to. Gconfdir =/etc/ganglia-web# Gweb statedir (where conf dir and dwoo templates dir is stored) Gweb_statedir =/var/lib/gang lia-web# Gmetad RootDir (parent location of rrd folder) Gmetad_rootdir =/var/lib/gangliaapache_user = apache############# #############################################

Modify the path address of the RRDtool execution file in the conf_defalut.php file, which affects the chart of the page display monitoring

# $conf [' gmetad_root '] = "/var/lib/ganglia"; $conf [' rrds '] = "${conf[' gmetad_root ']}/rrds"; $conf [' rrdtool '] = "/opt/ Rrdtool-1.4.9/bin/rrdtool ";

Make install

Turn off SELinux

/etc/selinux/config Modified: selinux=disabled

Turn off the firewall and start httpd

Service iptables stopchkconfig iptables offservice httpd startchkconfig httpd on


ganglia3.6.1 Installation Notes

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.