Rhel6-ganglia installation Configuration

Source: Internet
Author: User
Tags rrdtool rpmbuild

Rhel6-gangliaInstall configurations

Software: http://yunpan.cn/QbFvIIsQhvdws


1. ganglia is a distributed monitoring system with two Daemon clients: GangliaMonitoring Daemon

(Gmond) and GangliaMeta Daemon (gmetad), as well as GangliaPHP Web Frontend (based on

Dynamic web Access) is a Linux-based software that monitors the running performance of the system. The interface is beautiful, rich, and powerful.

Ganglia depends on a web server to display the cluster status. rrdtool is used to store data and generate graphs. xml parsing is required, so expat is required. libconfuse is required for parsing the configuration file. To install httpd of apche, you also need to support php4 and later versions, as well as some dependent software.

Http://ganglia.sourceforge.net/download the software

2. Installation

Dependency package:

[Root @ brief 32 ~] # Yum-y install apr-devel apr-util check-devel cairo-develpango-devel libxml2-devel rpm-build glib2-devel ready-develfreetype-devel fontconfig-devel gcc-c ++ expat- devel python-devellibXrender-devel

After you open ganglia-3.6.0.tar.gz, you can see that a ganglia. spec file proves that you can directly compile the rpm package through rpmbuild;

Dependent packages required for build:

Yum-yinstall libart_lgpl-devel pcre-devel libtool

[Root @ brief 32 ~] # Rpm-ivh libconfuse-devel-2.6-3.el6.x86_64.rpmlibconfuse-2.6-3.el6.x86_64.rpm

[Root @ brief 32 ~] # Yum localinstall rrdtool-devel-1.3.8-6.el6.x86_64.rpm

[Root @ brief 32 ~] # Rpmbuild-tb ganglia-3.6.0.tar.gz #-tb indicates build binary files from the tar package

[Root @ brief 32 ~] # Cd/root/rpmbuild/RPMS/x86_64/

[Root @ desk32x86_64] # ls

Ganglia-devel-3.6.0-1.x86_64.rpm

Ganglia-gmetad-3.6.0-1.x86_64.rpm

Ganglia-gmond-3.6.0-1.x86_64.rpm

Ganglia-gmond-modules-python-3.6.0-1.x86_64.rpm

Libganglia-3.6.0-1.x86_64.rpm

[Root @ desk32x86_64] # rpm-ivh *

/Etc/ganglia/main configuration directory

/Var/lib/ganglia/rrdsrrds graph information storage directory

[Root @ resolve 32ganglia] # vim gmond. conf

...................................

Cluster {

Name = "mycluster"

Owner = "unspecified"

Latlong = "unspecified"

Url = "unspecified"

}

...................................

The following content does not need to be modified:

Udp_send_channel {# udp packet transmission channel

Mcast_join = 239.2.11.71 # multicast, which works under channel 239.2.11.71. If the unicast mode is used, write host = host1 (the target host that receives data). In unicast mode, you can configure multiple udp_send_channels.

Port = 8649 # listening port

Ttl = 1

}

Udp_recv_channel {# udp packet receiving configuration

Mcast_join = 239.2.11.71 # It also works in the 239.2.11.71 channel. If unicast mode is used, write host = localip, which must be the ip address of the local machine.

Port = 8649 # listening port

Bind = 239.2.11.71 # bind

}

Tcp_accept_channel {

Port = 8649 # The port listened through the tcp protocol. The remote end can obtain monitoring data by connecting to port 8649. gmetad obtains xml data through this port.

}


[Root @ desk32ganglia] #/etc/init. d/gmetad start

StartingGANGLIA gmetad: [OK]

[Root @ resolve 32ganglia] #/etc/init. d/gmond start

StartingGANGLIA gmond: [OK]

Tcp 0 0 0.0.0.0: 8649 0.0.0.0: * LISTEN 23393/gmond

Tcp 0 0 0.0.0.0: 8651 0.0.0.0: * LISTEN 23376/gmetad

Tcp 0 0 0.0.0.0: 8652 0.0.0.0: * LISTEN 23376/gmetad

[Root @ brief 32 ~] # Tar ganglia-web-3.5.2.tar.gz-C/var/www/html/

[Root @ brief 32 ~] # Cd/var/www/html/

[Root @ desk32html] # mv ganglia-web-3.5.2/ganglia

[Root @ desk32ganglia] # yum-y install rsync

[Root @ resolve 32ganglia] # make install

/Etc/init. d/gmetadrestart

/Etc/init. d/gmondrestart

Web access:

Http: // Route 32/ganglia

650) this. width = 650; "src =" http://img1.51cto.com/attachment/201310/174442185.png "title =" 1.png" alt = "174442185.png"/>

Of course, the data obtained by ganglia is only ipv32.example.com.

Currently, gmond client service is installed on other hosts, so the server can monitor all clients on the same network.

Client Software Package: ganglia-gmond-3.6.0-1.x86_64.rpm

Ganglia-gmond-modules-python-3.6.0-1.x86_64.rpm

Libganglia-3.6.0-1.x86_64.rpm

Libconfuse-2.6-3.el6.x86_64.rpm

Libconfuse-devel-2.6-3.el6.x86_64.rpm

[Root @ 32x86_64] # scp ganglia-gmond-* limit 3:

[Root @ 32x86_64] # scp ganglia-gmond-* server60

[Root @ route 32x86_64] # scp libganglia-3.6.0-1.x86_64.rpm limit 3:

[Root @ 32x86_64] # scp libganglia-3.6.0-1.x86_64.rpm server60:

[Root @ brief 32 ~] # Scp libconfuse-2.6-3.el6.x86_64.rpm valve 3:

[Root @ brief 32 ~] # Scp libconfuse-2.6-3.el6.x86_64.rpm server60:

The following operations are performed on clients 20173192.168.122.3 and server60192.168.122.160 respectively:

[Root @ override 3 ~] # Rpm-ivh libconfuse-2.6-3.el6.x86_64.rpmlibconfuse-devel-2.6-3.el6.x86_64.rpm

[Root @ override 3 ~] # Rpm-ivh libganglia-3.6.0-1.x86_64.rpm

[Root @ override 3 ~] # Rpm-ivh ganglia-gmond -*



3. Integration of ganglia and nagios;

For nagios configuration, see blog rhel6-nagios installation Configuration:

Http://wangziyin.blog.51cto.com/6948950/1305465


[Root @ javas32contrib] # cp/root/rpmbuild/BUILD/ganglia-3.6.0/contrib/check_ganglia.py/usr/local/nagios/libexec/

[Root @ mongo32contrib] # cd/usr/local/nagios/libexec/

[Root @ desk32libexec] # chmod a + x check_ganglia.py

[Root @ desk32libexec] # vim check_ganglia.py


Configure nagios:

[Root @ ipv32objects] # vim commands. cfg

############## Check_ganglia ######################## #####

Definecommand {

Command_name check_ganglia

Command_line $ USER1 $/check_ganglia.py-h $ HOSTNAME $-m $ ARG1 $-w $ ARG

2 $-c $ ARG3 $

}


[Root @ ipv32objects] # vim templates. cfg

Defineservice {

Use generic-service

Name ganglia-service

Hostgroup_name ganglia-servers

Service_groups ganglia-metrics

}

[Root @ ipv32objects] # vim service. cfg

Defineservicegroup {

Servicegroup_name ganglia-metrics

Alias ganglia-metrics

Membersserver60.example.com, root partition, server60.example.com, system load, server60.example.com, idle memory

}


Defineservice {

Use ganglia-service

Host_name server60.example.com

Service_description root Partition

Check_command check_ganglia! Disk_free_percent_rootfs! 20! 10

}

Defineservice {

Use ganglia-service

Host_name server60.example.com

Service_description system load

Check_command check_ganglia! Load_one! 4! 5

}


Defineservice {

Use ganglia-service

Host_name server60.example.com

Service_description memory idle

Check_command check_ganglia! Mem_free! 50000! 30000

}


[Root @ ipv32objects] # vim hosts. cfg

Definehost {

Use linux-server

Host_name server60.example.com

Alias ganglia client

Address 192.168.122.160

}

Definehostgroup {

Hostgroup_name ganglia-servers

Alias ganglia-servers

Members versions 32.example.com

}

[Root @ %32objects] #/usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/nagios. cfg


[Root @ ipv32objects] #/etc/init. d/nagios restart


This article is from "Wang zyin's blog", please be sure to keep this source http://wangziyin.blog.51cto.com/6948950/1305479

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.