ganglia由分三个部分组成gmond,gmetad、gweb。
yum -y install epel-release
yum -y install ganglia-gmond
yum -y install ganglia-gmetad
sudo yum -y install httpd php # 需要额外安装httpd、php
sudo yum -y install ganglia-web
# Ganglia monitoring system php web frontend
Alias /ganglia /usr/share/ganglia
<Location /ganglia>
Require all granted
#Order deny,allow
#Deny from all
#Allow from all
# Allow from 127.0.0.1
# Allow from ::1
# Allow from .example.com
</Location>
data_source “hadoop202” 192.168.88.202
[atguigu@hadoop102 flume]$ sudo vim /etc/ganglia/gmond.conf
修改为:
cluster {
name = "hadoop202" ###名字要和gmetad中的相同
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 = 192.168.88.202 ###接收数据的节点IP地址
port = 8649
ttl = 1
}
udp_recv_channel {
# mcast_join = 239.2.11.71
port = 8649
bind = 192.168.88.202 ###节点本机的IP地址
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
}
SELINUX=disabled # 解决冲突
systemctl start httpd.service
systemctl start gmetad.service
systemctl start gmond.service
systemctl stop firewalld
chmod -R 777 /var/lib/ganglia