Hadoop与HBase集群的监控

一、Ganglia分布式监控部署

具体安装流程及方法参考以下博客即可。
Ganglia分布式监控部署

二、配置Hadoop

1.添加Hadoop被Ganglia监控,去掉文件中以***释并修改(每台同样配置)
[admin@admin01 hadoop]$ pwd
/home/admin/softwares/hadoop-2.7.2/etc/hadoop
[admin@admin01 hadoop]$ vi hadoop-metrics2.properties
##
*.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
#当有多个ganglia监控系统时,以逗号分隔  都指定ganglia服务器
namenode.sink.ganglia.servers=192.168.47.101:8649,192.168.47.102:8649,192.168.47.103:8649
datanode.sink.ganglia.servers=192.168.47.101:8649,192.168.47.102:8649,192.168.47.103:8649
resourcemanager.sink.ganglia.servers=192.168.47.101:8649,192.168.47.102:8649,192.168.47.103:8649
nodemanager.sink.ganglia.servers=192.168.47.101:8649,192.168.47.102:8649,192.168.47.103:8649
jobhistoryserver.sink.ganglia.servers=192.168.47.101:8649,192.168.47.102:8649,192.168.47.103:8649

三、配置Hbase

1.添加Hbase被Ganglia监控,去掉文件中以***释并修改
[admin@admin01 ~]$ cd softwares/hbase-1.3.1/conf/
[admin@admin01 conf]$ vi hadoop-metrics2-hbase.properties
## 添加  
hbase.sink.ganglia.period=10  
#当有多个ganglia监控系统时,以逗号分隔  都指定ganglia服务器
hbase.sink.ganglia.servers=192.168.47.101:8649,192.168.47.102:8649,192.168.47.103:8649

四、启动检验

先需要重启hadoop和hbase 。在各个节点上启动gmond服务,主节点还需要启动gmetad服务。
Hadoop与HBase集群的监控_第1张图片
Hadoop与HBase集群的监控_第2张图片
Hadoop与HBase集群的监控_第3张图片
Hadoop与HBase集群的监控_第4张图片
Hadoop与HBase集群的监控_第5张图片

你可能感兴趣的:(Hadoop与HBase集群的监控)