当前位置:网站首页>【CDH】通过 ClouderaManager 配置CDH组件用 prometheus 监控采集JMX信息
【CDH】通过 ClouderaManager 配置CDH组件用 prometheus 监控采集JMX信息
2022-07-28 16:24:00 【kiraraLou】
前言:
最近需要在 cloudera manager 监控界面对CDH 的组件来用 prometheus 监控。也参考了很多网上的资料,目前很多都是修改的后台配置文件,目前测试下来,如果通过 cloudera manager 来启动服务,感觉配置没有生效。这里采用在 cloudera manager 监控界面配置参数的方式,已经测试通过。这里整理并记录一下。
具体实践:
这里以 Hbase 服务为例。来进行我们配置,别的组件参考即可。
依赖组件
需要用到的服务有
- prometheus
- grafana
- jmx_exporter
https://github.com/prometheus/jmx_exporter
修改配置

在HBase 配置中修改 **HBase 服务环境高级配置代码段(安全阀)**:
配置内容参考如下:
HBASE_MASTER_OPTS=-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=10101 -javaagent:/run/cloudera-scm-agent/jmx_prometheus_javaagent-0.16.1.jar=9213:/run/cloudera-scm-agent/hbase.yml
HBASE_REGIONSERVER_OPTS=-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=10102 -javaagent:/run/cloudera-scm-agent/jmx_prometheus_javaagent-0.16.1.jar=9214:/run/cloudera-scm-agent/hbase.yml
hbase.yml
hbase.yml 文件内容如下:
---
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: .+
遇到问题
之前调试一直跑不通,各种修改文件权限,路径,版本的方式都尝试过了,最后发现 yml 文件的后缀必须为 .yml,而不能为 yaml。不知道为什么,有知道的大佬还请指教。
总结:
到此其实已经实现CDH集群集成prometheus,剩下的内容就比较简单了,使用prometheus监听端口即可,这里不是我们的重点。
参考:
- https://community.cloudera.com/t5/Support-Questions/Adding-a-javaagent-in-CDH-5-or-6-2/m-p/304399
- https://community.cloudera.com/t5/Support-Questions/Customize-Hbase-JVM-settings-in-CDH-5-4-2/td-p/30997
- https://zhuanlan.zhihu.com/p/358908161
边栏推荐
- Message Passing for Complex Question Answering over Knowledge Graphs
- 解决SQL Server数据库独占的问题
- DGL Chapter 1 (official tutorial) personal notes
- 我为什么选择使用Go语言?
- 异步FIFO基本原理(基于Verilog的简单实现)
- Application of Pegasus d200s UAV and airborne lidar in large-scale DEM construction
- Unity shader realizes mirror effect with rendered texture
- MySQL数据库增删改查(基础操作命令详解)
- Codeworks round 801 (Div. 2) and epic Institute of technology round D. tree queries (tree DP)
- Realization of reflection and refraction effect in unity shader cube texture
猜你喜欢

Valarray Library Learning

mysql 最大建议行数2000w,靠谱吗?

数据库故障容错之系统时钟故障

Unity3d shader achieves ablation effect

Introduction to vscade interface

The actual combat of the beego framework of goweb development: Section III program execution process analysis

高速电路中电阻的选择

Microservice Architecture - service registry and service gateway (6.8) (Reprint)

How to protect image security during construction

配置V530交换机步骤
随机推荐
Net framework
利用SQL Server代理作业对数据库进行定时还原
Self study examination in April 2021
What does the service grid that has been popular for two years bring to microservices? (Reprinted)
The longest substring of sword finger offer without repeated characters
WPF command button transparent style
一文了解 Kubernetes 中的服务发现
The practice of the beego framework of goweb development: Section II project initialization configuration
Use of influxdb2
Goweb开发之Beego框架实战:第三节 程序执行流程分析
Pytorch Foundation: similarities and differences between torch.mul, torch.mm and torch.matmul
MySQL数据库增删改查(基础操作命令详解)
带参数的微信小程序二维码生成
Unity3d simple implementation of water surface shader
After paying $1.8 billion in royalties to Qualcomm, Huawei reportedly ordered 120million chips from MediaTek! Official response
Classroom attendance system based on QT design (using RDS for MySQL cloud database)
Goweb开发之Beego框架实战:第四节 数据库配置及连接
充分利用----英文
The practice of beego framework developed by goweb: Section 4 database configuration and connection
Unity shader screen post-processing