ganglia3.7.2,web3.7.1安装

1.准备安装包

ganglia-3.7.2-2.el6.x86_64.rpm

ganglia-gmetad-3.7.2-2.el6.x86_64.rpm

ganglia-gmond-3.7.2-2.el6.x86_64.rpm

ganglia-gmond-python-3.7.2-2.el6.x86_64.rpm

ganglia-web-3.7.1-2.el6.x86_64.rpm

2.所需依赖包

libconfuse-2.7-4.el6.x86_64.rpm

rrdtool-1.3.8-6.el6.x86_64.rpm

rrdtool-devel-1.3.8-6.el6.x86_64.rpm

php-bcmath-5.3.3-22.el6.x86_64.rpm

php-process-5.3.3-22.el6.x86_64.rpm

php-ZendFramework-1.11.10-1-mdv2012.0.noarch.rpm

3.安装

rpm -ivh ganglia-3.7.2-2.el6.x86_64.rpm

rpm -ivh ganglia-gmond-3.7.2-2.el6.x86_64.rpm

rpm -ivh ganglia-gmond-python-3.7.2-2.el6.x86_64.rpm

rpm -ivh ganglia-gmetad-3.7.2-2.el6.x86_64.rpm

yum install ganglia-web-3.7.1-2.el6.x86_64.rpm(web建议用yum安装,涉及一些镜像自带的安装包,比较方便)

yum install httpd

4.配置

本地想安装一个gmetad高可用,因为项目生产中安装的ganglia前台图标出现了有规律的断开现象,原因初步怀疑网络问题,但是想从ganglia自身先考虑下优化方案。

①gmetad.conf

hdp1:

data_source "zhj" localhost

gridname "ZHJ"

hdp2:

data_source "zhj" hdp1

gridname "ZHJ"

②gmond.conf

hdp1:

cluster {

  name = "zhj"

  owner = "unspecified"

  latlong = "unspecified"

  url = "unspecified"

}

udp_send_channel {

  #bind_hostname = yes # Highly recommended, soon to be default.

                       # This option tells gmond to use a source address

                       # that resolves to the machine's hostname.  Without

                       # this, the metrics may appear to come from any

                       # interface and the DNS names associated with

                       # those IPs will be used to create the RRDs.

  #mcast_join = 239.2.11.71

  host = 172.16.196.141

  port = 8649

  #ttl = 1

}

 

/* 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

  #retry_bind = true

  # Size of the UDP buffer. If you are handling lots of metrics you really

  # should bump it up to e.g. 10MB or even higher.

  # buffer = 10485760

}

tcp_accept_channel {

  port = 8649

  # If you want to gzip XML output

  gzip_output = no

}

hdp2、hdp3:

cluster {

  name = "zhj"

  owner = "unspecified"

  latlong = "unspecified"

  url = "unspecified"

}

udp_send_channel {

  #bind_hostname = yes # Highly recommended, soon to be default.

                       # This option tells gmond to use a source address

                       # that resolves to the machine's hostname.  Without

                       # this, the metrics may appear to come from any

                       # interface and the DNS names associated with

                       # those IPs will be used to create the RRDs.

  #mcast_join = 239.2.11.71

  host = 172.16.196.141

  port = 8649

  #ttl = 1

}

 

/* 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

  #retry_bind = true

  # Size of the UDP buffer. If you are handling lots of metrics you really

  # should bump it up to e.g. 10MB or even higher.

  # buffer = 10485760

}

tcp_accept_channel {

  #port = 8649

  # If you want to gzip XML output

  gzip_output = no

}

③gweb

rpm包默认的安装地址是/usr/share/ganglia

节点:hdp1

需修改的配置文件:

vi /etc/httpd/conf.d/ganglia.conf

Alias /ganglia /usr/share/ganglia

 

<Location /ganglia>

  Order deny,allow

  #Deny from all

  Allow from all

  Allow from 127.0.0.1

  Allow from ::1

  # Allow from .example.com

</Location>

 

vi /etc/httpd/conf/httpd.conf

 

NameVirtualHost *:80

#

# NOTE: NameVirtualHost cannot be used without a port specifier

# (e.g. :80) if mod_ssl is being used, due to the nature of the

# SSL protocol.

#

 

#

# VirtualHost example:

# Almost any Apache directive may go into a VirtualHost container.

# The first VirtualHost section is used for requests without a known

# server name.

#

<VirtualHost *:80>

#    ServerAdmin webmaster@dummy-host.example.com

    DocumentRoot /usr/share/ganglia ##conf_default所在目录

    ServerName myganglia

#    ErrorLog logs/dummy-host.example.com-error_log

#    CustomLog logs/dummy-host.example.com-access_log common

</VirtualHost>

5.启动

hdp1-hdp3依次

service gmond start

hdp1-2依次

service gmetad start

hdp1

service httpd start

 

6.验证结果

 

 

 

 

posted on 2016-06-02 11:37  roger888  阅读(2220)  评论(0编辑  收藏  举报

导航