Hadoop、HBase配置Ganglia指南(metrics1)

Server端:
yum install rrdtool ganglia ganglia-gmetad ganglia-gmond ganglia-web httpd php
Client端:
yum install ganglia-gmond
创建RRD目录
mkdir -p /var/lib/ganglia/rrds
chown ganglia:ganglia /var/lib/ganglia/rrds
编辑/etc/ganglia/gmond.conf
cluster {
  name = " DFS"
  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 = master.hadoop.test
  port = 8649
  ttl = 1
}
/* You can specify as many udp_recv_channels as you like as well. */
udp_recv_channel {
  port = 8649
  bind = master.hadoop.test
}
/* You can specify as many tcp_accept_channels as you like to share
   an xml description of the state of the cluster */
tcp_accept_channel {
  bind = master.hadoop.test
  port = 8649
}
编辑/etc/ganglia/gmetad.conf
data_source " DFS" master.hadoop.test:8649

安装ganglia-web
cd /var/www/html
tar zxvf ganglia-web-3.5.7.tar.gz
mv ganglia-web-3.5.7 ganglia
修改Apache配置
vim /etc/httpd/conf.d/ganglia.conf
<Location /ganglia>
    Order deny,allow
    Allow from all
</Location>
# 开机运行采集进程
chkconfig --levels 235 gmond on
# 开机运行数据存储进程
chkconfig --levels 235 gmetad on
# 开机运行apache服务
chkconfig --levels 235 httpd on
启动服务
service gmond start
service gmetad start
service httpd restart

修改hadoop配置:
vim $HADOOP_HOME/conf/hadoop-metrics.properties
# Configuration of the "dfs" context for ganglia
dfs.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
dfs.period=10
dfs.servers=master.hadoop.test:8649
# Configuration of the "mapred" context for ganglia
mapred.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
mapred.period=10
mapred.servers=master.hadoop.test:8649
# Configuration of the "jvm" context for ganglia
jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
jvm.period=10
jvm.servers=master.hadoop.test:8649
rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
rpc.period=10
rpc.servers=master.hadoop.test:8649
重启Hadoop
修改HBase配置:
hbase.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
hbase.period=10
hbase.servers=master.hadoop.test:8649


jvm.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
jvm.period=10
jvm.servers=master.hadoop.test:8649


rpc.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
rpc.period=10
rpc.servers=master.hadoop.test:8649


rest.class=org.apache.hadoop.metrics.ganglia.GangliaContext31
rest.period=10
rest.servers=master.hadoop.test:8649
重启Hbase
访问http://${ganglia_home}/ganglia

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值