现在的位置: 首页 > 综合 > 正文

配置ganglia 监控 cdh4.2

2013年12月12日 ⁄ 综合 ⁄ 共 723字 ⁄ 字号 评论关闭

1. 找到hadoop-2.0.0-mr1-cdh4.2.1/conf 目录下面的 hadoop-metrics.properties 文件

2. 去掉其中发送到ganglia的metrics的注释例如

# Configuration of the "mapred" context for null 不发送
#mapred.class=org.apache.hadoop.metrics.spi.NullContext

# Configuration of the "mapred" context for file 写入到文件
#mapred.class=org.apache.hadoop.metrics.file.FileContext
#mapred.period=10
#mapred.fileName=/tmp/mrmetrics.log

# Configuration of the "mapred" context for ganglia
# Pick one: Ganglia 3.0 (former) or Ganglia 3.1 (latter)
配置发送到ganglia,我的环境安装的是3.6.0 故打开第二行配置

# mapred.class=org.apache.hadoop.metrics.ganglia.GangliaContext
 mapred.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
 mapred.period=10

# 我的ganglia配置的是单播 cloud1 表示gmetad采集的服务器的名字 8649 表示端口
 mapred.servers=cloud1:8649

3. 运行的所有节点都需要修改此配置文件

4. 重启mapreduce

抱歉!评论已关闭.