ganglia安装和配置

金令秋
2023-12-01

1.安装依赖

yum -y install httpd-devel automake autoconf libtool ncurses-devel libxslt groff pcre-devel pkgconfig

2.安装ganglia-gmetad 和 ganglia-web

yum search ganglia
yum install -y ganglia-gmetad.x86_64 ganglia-web.x86_64
rpm -qa | grep ganglia

3.配置gmetad

vi /etc/ganglia/gmetad.conf

data_source "集群名称" gmetad主机名或者IP

4.修改Apache配置

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

修改Deny from all 为 allow from all 

5.安装启动监控节点的后台进程gmond

yum search ganglia
yum install -y ganglia-gmond.x86_64

6.配置gmond

vi /etc/ganglia/gmond.conf

cluster {  
  name = "hadoop cluster"------ cluster名称,是你在gmetad.conf里配置的data_source名称  
  owner = "unspecified"  
  latlong = "unspecified"  
  url = "unspecified"  
}  

udp_send_channel {  
  #mcast_join = 239.2.11.71 ----- 组播  
  host = localhost -------------- 单播 gmeta主机的ip/主机名lboenMasterTest  
  port = 8649  
  ttl = 1  
}  

udp_recv_channel {  
  #mcast_join = 239.2.11.71  
  port = 8649  
  bind = localhost ------------- 本机的ip/hostname  
}  

7.配置开机自启

chkconfig --add gmetad  
chkconfig --add gmond  
chkconfig --add httpd 

8.关闭selinux

永久修改(需要重启机器):vi /etc/selinux/config,把SELINUX=enforcing改成SELINUX=disable。
临时修改(无需重启机器):setenforce 0。

9.启动

service gmetad start
service gmond start
service httpd start
service gmetad status    -------------------验证是否启动成功
service gmond status

10.web测试

http://gmetad主机/ganglia

其他相关文章:

1. nagios安装和配置

2. ganglia与nagios组合使用

 类似资料: