yum -y install httpd-devel automake autoconf libtool ncurses-devel libxslt groff pcre-devel pkgconfig
# yum install epel-release # yum install ganglia-web ganglia-gmetad ganglia-gmond 或者直接 yum install -y ganglia*
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm yum install -y ganglia*
data_source "hadoop" 192.168.1.187 192.168.1.186 192.168.1.184 // 使用单播的方式,加入所有要监控的机器ip,默认端口是8649 case_sensitive_hostnames 1 //是否忽略大小写,1代表不忽略,如果你的机器名里面含有大写的字母,一定要配置1,否则ganglia的前端图形就不能正确的读取rrds里面的每个机器的数据
cluster { name = "hadoop" #配置的名字与gmetad里面的需要一致 owner = "unspecified" latlong = "unspecified" url = "unspecified" } udp_send_channel { #mcast_join = 239.2.11.71 #注释掉默认的多播地址 host = 192.168.1.187 # 使用单播模式,发送消息 port = 8649 ttl = 1 } udp_recv_channel { #mcast_join = 239.2.11.71 port = 8649 bind = 192.168.1.187 #主节点的这个配置需要加上,用来接受其他机器上的传输过来的数据 , 特别注意从节点上的这项配置是 retry_bind = true }
<Location /ganglia> Order deny,allow Allow from all #允许所有的机器访问 #Deny from all #Allow from 127.0.0.1 # Allow from ::1 # Allow from .example.com </Location>
yum install -y ganglia-gmond
cluster { name = "hadoop" #配置的名字与gmetad里面的需要一致 owner = "unspecified" latlong = "unspecified" url = "unspecified" } udp_send_channel { #mcast_join = 239.2.11.71 #注释掉默认的多播地址 host = 192.168.1.187 # 使用单播模式,发送消息 port = 8649 ttl = 1 } udp_recv_channel { #mcast_join = 239.2.11.71 port = 8649 #bind = 192.168.1.187 仅仅安装gmond的节点上,不需要这项配置,加上会报错 retry_bind = true }
sudo ln -s /ROOT/server/rrds /var/lib/ganglia/rrds
mkdir -p /some/other/place/ chown -R ganglia:ganglia /some/other/place/ chmod -R 777 /some/other/place/
sudo yum remove -y ganglia-web ganglia-gmetad
sudo service gmetad start sudo service gmond start sudo service httpd start
sudo service gmond start
*.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31 *.sink.ganglia.period=10 *.sink.ganglia.supportsparse=true *.sink.ganglia.slope=jvm.metrics.gcCount=zero,jvm.metrics.memHeapUsedM=both *.sink.ganglia.dmax=jvm.metrics.threadsBlocked=70,jvm.metrics.memHeapUsedM=40 namenode.sink.ganglia.servers=192.168.1.187:8649 #当有多个ganglia监控系统时,以逗号分隔 datanode.sink.ganglia.servers=192.168.1.187:8649 #都指定ganglia服务器 resourcemanager.sink.ganglia.servers=192.168.1.187:8649 nodemanager.sink.ganglia.servers=192.168.1.187:8649 mrappmaster.sink.ganglia.servers=192.168.1.187:8649 jobhistoryserver.sink.ganglia.servers=192.168.1.187:8649
*.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31 *.sink.ganglia.period=10 hbase.sink.ganglia.period=10 hbase.sink.ganglia.servers=192.168.1.187:8649