Ganglia3.1.7监控Hadoop2集群总结

1. 配置Ganglia3.1.7只需要修改三个文件 gmond.conf, gmead.conf, hadoop-metrics2.properties

2. gmetad.conf

1 gmetad.conf
   data_source "cluster1 name" hostname1:8658
   data_source "cluster2 name" hostname2:8659

3. gmond.conf 

既是发送端又是接收端 每组集群可以配置一个 单播模式

globals {
  daemonize = yes
  setuid = no //default yes
  user = nobody
  debug_level = 0
  max_udp_msg_len = 1472
  mute = no
  deaf = no
  allow_extra_data = yes
  host_dmax = 86400 /*secs. Expires (removes from web interface) hosts in 1 day */
  host_tmax = 20 /*secs */
  cleanup_threshold = 300 /*secs */
  gexec = no
  send_metadata_interval = 0 /*secs */
}
cluster {
  name = "cluseter1 name" //修改名字
  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 = hostname1 //server
  port = 8658
  ttl = 1
}
udp_recv_channel {
  #mcast_join = 239.2.11.71
  port = 8658
  bind = hostname //server
}

集群其他机器只是发送端

 used to only support having a single channel */
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 = etl-jrdata-09.pekdc1.jdfin.local
  port = 8658
  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 = 8658
  bind = 239.2.11.71
}
4. hadoop-metrics2.properties

*.sink.ganglia.class=org.apache.hadoop.metrics2.sink.ganglia.GangliaSink31  
*.sink.ganglia.period=10  
  
*.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=hostname1:8658  
resourcemanager.sink.ganglia.servers=hostname1:8658  
  
datanode.sink.ganglia.servers=hostname1:8658    
nodemanager.sink.ganglia.servers=hostname1:8658    
    
    
maptask.sink.ganglia.servers=hostname1:8658    
reducetask.sink.ganglia.servers=hostname1:8658  

5.额外 Apache conf 

LoadModule php5_module        modules/libphp5.so

AddType application/x-httpd-php .php
 AddType application/x-httpd-php-source .phps
 
 # 在文件最后增加如下内容
# ganglia
Alias /ganglia "/soft/ganglia/ganglia-web-3.5.12"
<Directory "/soft/ganglia/ganglia-web-3.5.12">
     AuthType Basic
     Options None
     AllowOverride None
     Order allow,deny
     Allow from all
</Directory>



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值