赞
踩
本次使用javaagent-0.16.0版本
监控hbase基于ambari
下载链接:https://github.com/prometheus/jmx_exporter/releases
/usr/hdp/3.1.4.0-315/hbase/lib下
所有节点加上JMX exporter的agent,此处用的是ambari,故在页面添加hbase-env
##对每个节点
export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
##对master节点,此处端口号是27000
export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=20101 -javaagent:$HBASE_HOME/lib/jmx_prometheus_javaagent-0.16.0.jar=27000:$HBASE_HOME/conf/hbase_jmx_config.yaml"
##对RS节点,此处端口号是27001
export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=20102 -javaagent:$HBASE_HOME/lib/jmx_prometheus_javaagent-0.16.0.jar=27001:$HBASE_HOME/conf/hbase_jmx_config.yaml"
---
lowercaseOutputName: true
lowercaseOutputLabelNames: true
rules:
- pattern: Hadoop<service=HBase, name=RegionServer, sub=Regions> <>Namespace_([^\W_]+)_table_([^\W_]+)_region_([^\W_]+)_metric_(\w+)
name: HBase_metric_$4
labels:
namespace: "$1"
table: "$2"
region: "$3"
- pattern: Hadoop<service=(\w+), name=(\w+), sub=(\w+)><>([\w._]+)
name: hadoop_$1_$4
labels:
"name": "$2"
"sub": "$3"
- pattern: .+
http://192.168.85.103:27001/metrics
- job_name: "hbase"
static_configs:
- targets: ["192.168.85.103:27001"]
nohup ./prometheus --config.file=prometheus.yml &
http://192.168.85.102:9090/
模板可以从下面链接下载
https://grafana.com/grafana/dashboards/
yum install grafana-enterprise-8.3.4-1.x86_64.rpm
https://grafana.com/grafana/dashboards/
此处下载2.x模板
grafana页面导入模板
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。