From 5a6a0bbd5e68edda5d6ee36b028801630f2a48d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BC=9A=E7=BC=96=E7=A8=8B=E7=9A=84=E7=8E=8B=E5=AD=A6?= =?UTF-8?q?=E9=95=BF?= <71161318+wang1027-wqh@users.noreply.github.com> Date: Sun, 28 Aug 2022 08:42:57 +0800 Subject: [PATCH] [monitor] feature: support apache kafka monitor (#263) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: [manager]feature: add Kafka Monitor #wqh feat: [manager、home]feature: code and help doc #wqh feat: [home]feature: tomcat help doc #wqh feat: [manager]feature: application.yml #wqh --- home/docs/help/kafka.md | 94 +++++++ home/docs/help/tomcat.md | 71 ++++++ home/static/img/docs/help/img.png | Bin 0 -> 16983 bytes .../main/resources/define/app/app-kafka.yml | 240 ++++++++++++++++++ .../resources/define/param/param-kafka.yml | 45 ++++ 5 files changed, 450 insertions(+) create mode 100644 home/docs/help/kafka.md create mode 100644 home/docs/help/tomcat.md create mode 100644 home/static/img/docs/help/img.png create mode 100644 manager/src/main/resources/define/app/app-kafka.yml create mode 100644 manager/src/main/resources/define/param/param-kafka.yml diff --git a/home/docs/help/kafka.md b/home/docs/help/kafka.md new file mode 100644 index 00000000000..f68f995f604 --- /dev/null +++ b/home/docs/help/kafka.md @@ -0,0 +1,94 @@ +--- +id: Kafka +title: 监控:Kafka监控 +sidebar_label: Kafka监控 +--- + +> 对Kafka的通用性能指标进行采集监控 + +使用协议:JMX + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +| ----------- | ----------- | +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 监控名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 查询超时时间 | 设置Kafka连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 用户名 |Kafka所在Linux连接用户名 | +| 密码 | Kafka所在Linux连接密码 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为10秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + + +#### 指标集合:server_info + +| 指标名称 | 指标单位 | 指标帮助描述 | +| ----------- | ----------- | ----------- | +| Version | 无 | Kafka版本 | +| StartTimeMs | ms | 运行时间 | +| CommitId | 无 | | + + +#### 指标集合:code_cache + +| 指标名称 | 指标单位 | 指标帮助描述 | +| ----------- | ----------- | ----------- | +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大 | +| used | kb | 已使用 | + +#### 指标集合:broker_activecontroller_count + +| 指标名称 | 指标单位 | 指标帮助描述 | +| ----------- | ----------- | ----------- | +| Value | 个 | 活跃监控器数量 | + + + +#### 指标集合:broker_partition_count + +| 指标名称 | 指标单位 | 指标帮助描述 | +| ----------- | ----------- | ----------- | +| Value | 个 | 分区数量 | + +#### 指标集合:broker_leader_count + +| 指标名称 | 指标单位 | 指标帮助描述 | +| ----------- | ----------- | ----------- | +| Value | 个 | 领导者数量 | + + +#### 指标集合:broker_handler_avg_percent 请求处理器空闲率 + +| 指标名称 | 指标单位 | 指标帮助描述 | +| ----------- | ----------- | ----------- | +| EventType | 无 | 类型 | +| RateUnit | 具体情况具体分析 | 单位 | +| Count | 个 | 数量 | +| OneMinuteRate | % | 一分钟处理率 | +| FiveMinuteRate | % | 五分钟处理率 | +| MeanRate | 无 | 平均处理率 | +| FifteenMinuteRate | 无 | 十五分钟处理率 | + + +>其他指标见文知意 + +>Kafka开启JMX协议步骤 + +1. 安装Kafka +2. 修改启动脚本 +找到Kafka安装目录/bin/kafka-server-start.sh在 倒数第二行添加如下内容 +```aidl +export JMX_PORT=9999; +export KAFKA_JMX_OPTS="-Djava.rmi.server.hostname=ip地址 -Dcom.sun.management.jmxremote.rmi.port=9999 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"; + +// 这是最后一行本来就存在的 +exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka "$@" +``` + + diff --git a/home/docs/help/tomcat.md b/home/docs/help/tomcat.md new file mode 100644 index 00000000000..b5dcbaa9ed3 --- /dev/null +++ b/home/docs/help/tomcat.md @@ -0,0 +1,71 @@ +--- +id: Tomcat +title: 监控:Tomcat监控 +sidebar_label: Tomcat监控 +--- + +> 对Tomcat的通用性能指标进行采集监控 + +### 配置参数 + +| 参数名称 | 参数帮助描述 | +| ----------- | ----------- | +| 监控Host | 被监控的对端IPV4,IPV6或域名。注意⚠️不带协议头(eg: https://, http://)。 | +| 监控名称 | 标识此监控的名称,名称需要保证唯一性。 | +| 查询超时时间 | 设置Tomcat连接的超时时间,单位ms毫秒,默认3000毫秒。 | +| 用户名 | Tomcat所在Linux连接用户名 | +| 密码 | Tomcat所在Linux连接密码 | +| 采集间隔 | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为10秒 | +| 是否探测 | 新增监控前是否先探测检查监控可用性,探测成功才会继续新增修改操作 | +| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息 | + +### 采集指标 + + +#### 指标集合:memory_pool + +| 指标名称 | 指标单位 | 指标帮助描述 | +| ----------- | ----------- | ----------- | +| name | 无 | 指标名称 | +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大 | +| used | kb | 已使用 | + +#### 指标集合:code_cache + +| 指标名称 | 指标单位 | 指标帮助描述 | +| ----------- | ----------- | ----------- | +| committed | kb | 总量 | +| init | kb | 初始化大小 | +| max | kb | 最大 | +| used | kb | 已使用 | + +#### 指标集合:class_loading + +| 指标名称 | 指标单位 | 指标帮助描述 | +| ----------- | ----------- | ----------- | +| LoadedClassCount | 个 | 已加载类数量 | +| TotalLoadedClassCount | 个 | 历史已加载类总量 | +| UnloadedClassCount | 个 | 未加载类数量 | + + +#### 指标集合:thread + +| 指标名称 | 指标单位 | 指标帮助描述 | +| ----------- | ----------- | ----------- | +| TotalStartedThreadCount | 个 | 已经开始的线程数量 | +| ThreadCount | 个 | 线程数 | +| PeakThreadCount | 个 | 未加载类数量 | +| DaemonThreadCount | 个 | 守护进程数 | +| CurrentThreadUserTime | ms | 使用时间 | +| CurrentThreadCpuTime | ms | 使用CPU时间 | + +>Tomcat开启JMX协议步骤 + +1. 搭建好tomcat后,进入tomcat下的bin目录,修改catalina.sh文件 +2. vim catalina.sh +```aidl +CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=10.1.1.52 -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false" +``` +https://blog.csdn.net/weixin_41924764/article/details/108694239?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522166159263316782246440176%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=166159263316782246440176&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-3-108694239-null-null.142^v42^pc_rank_34_2,185^v2^control&utm_term=tomcat%E5%BC%80%E5%90%AFJMX&spm=1018.2226.3001.4187 diff --git a/home/static/img/docs/help/img.png b/home/static/img/docs/help/img.png new file mode 100644 index 0000000000000000000000000000000000000000..7b2ab3d85e4fa38eebd00bc9b5f1fa2c4d0aa1c9 GIT binary patch literal 16983 zcmdVBc|4ST{4eajyIX}+C_)NlFGL~Jrb4*0#$Zx*#*i@9se~ewH3n1GtdlHbnK4Dk zGGt$d(UhHGEHjufGtV`;@AEt7_q@*Qcb@0`abD-IYv#JX`)7N9mha2Ijc@TC5Iw-d z!^5Y4`-UkG&tFMAJb$R|`xAIGJJMaNK{WG@ ztjU?2nqzj}TK90ZZ&5AHG~>M;F`Ak%(wObRPB7kIdt6=A_N|{L=$HQXWJ<;>S(95i zi8aS~cz!(H;v<)m+CnbbrnD9&t|5`+M}fMibM8k^Y^cODeaOnznvacIV3xaJ<$lCD zjfz3=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MAyqfG2jME_V*$vQMzgZ;xB?Hth zDLv4sKC%xs?9*iZ_&QfDjVZJ|tbaz06xZxGj^7P167IfEwZi{LFLaZ@;Z{cREb6GO f?OgmE_Tfl6Udpui{$Pv9{h+UBe535z{b&CV(90a< literal 0 HcmV?d00001 diff --git a/manager/src/main/resources/define/app/app-kafka.yml b/manager/src/main/resources/define/app/app-kafka.yml new file mode 100644 index 00000000000..d1cfbc251ff --- /dev/null +++ b/manager/src/main/resources/define/app/app-kafka.yml @@ -0,0 +1,240 @@ +category: mid +app: kafka +name: + zh-CN: kafka + en-US: kafka +# 参数映射map. type是参数类型: 0-number数字, 1-string明文字符串, 2-secret加密字符串 +# 强制固定必须参数 - host +configmap: + - key: host + type: 1 + - key: port + type: 0 + - key: username + type: 1 + - key: password + type: 2 + - key: url + type: 1 +# 指标组列表 +metrics: + - name: server_info + priority: 0 + fields: + - field: Version + type: 1 + - field: StartTimeMs + type: 1 + - field: CommitId + type: 1 + protocol: jmx + jmx: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + # jmx mbean object name + objectName: kafka.server:type=app-info,id=0 + url: ^_^url^_^ + + - name: broker_activecontroller_count + priority: 1 + fields: + - field: Value + type: 0 + protocol: jmx + jmx: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + # jmx mbean object name + objectName: kafka.controller:type=KafkaController,name=ActiveControllerCount + url: ^_^url^_^ + + - name: broker_partition_count + priority: 1 + fields: + - field: Value + type: 0 + protocol: jmx + jmx: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + # jmx mbean object name + objectName: kafka.server:type=ReplicaManager,name=PartitionCount + url: ^_^url^_^ + + - name: broker_leader_count + priority: 1 + fields: + - field: Value + type: 0 + protocol: jmx + jmx: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + # jmx mbean object name + objectName: kafka.server:type=ReplicaManager,name=LeaderCount + url: ^_^url^_^ + + - name: broker_handler_avg_percent + priority: 2 + fields: + - field: EventType + type: 1 + - field: RateUnit + type: 1 + - field: Count + type: 0 + - field: OneMinuteRate + type: 0 + - field: FiveMinuteRate + type: 0 + - field: MeanRate + type: 0 + - field: FifteenMinuteRate + type: 0 + protocol: jmx + jmx: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + # jmx mbean object name + objectName: kafka.server:type=KafkaRequestHandlerPool,name=RequestHandlerAvgIdlePercent + url: ^_^url^_^ + + - name: broker_topic_metrics + priority: 2 + fields: + - field: EventType + type: 1 + - field: RateUnit + type: 1 + - field: MeanRate + type: 0 + - field: FifteenMinuteRate + type: 0 + - field: OneMinuteRate + type: 0 + - field: FiveMinuteRate + type: 0 + - field: Count + type: 0 + protocol: jmx + jmx: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + # jmx mbean object name + objectName: kafka.server:type=BrokerTopicMetrics,name=BytesInPerSec + url: ^_^url^_^ + + - name: broker_bytes_out_persec + priority: 2 + fields: + - field: EventType + type: 1 + - field: RateUnit + type: 1 + - field: MeanRate + type: 0 + - field: FifteenMinuteRate + type: 0 + - field: OneMinuteRate + type: 0 + - field: FiveMinuteRate + type: 0 + - field: Count + type: 0 + protocol: jmx + jmx: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + # jmx mbean object name + objectName: kafka.server:type=BrokerTopicMetrics,name=BytesOutPerSec + url: ^_^url^_^ + + + + + + - name: produce_message_conversions_persec + priority: 2 + fields: + - field: EventType + type: 1 + - field: RateUnit + type: 1 + - field: MeanRate + type: 0 + - field: FifteenMinuteRate + type: 0 + - field: OneMinuteRate + type: 0 + - field: FiveMinuteRate + type: 0 + - field: Count + type: 0 + protocol: jmx + jmx: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + # jmx mbean object name + objectName: kafka.server:type=BrokerTopicMetrics,name=ProduceMessageConversionsPerSec + url: ^_^url^_^ + + - name: produce_total_requests_persec + priority: 2 + fields: + - field: EventType + type: 1 + - field: RateUnit + type: 1 + - field: MeanRate + type: 0 + - field: FifteenMinuteRate + type: 0 + - field: OneMinuteRate + type: 0 + - field: FiveMinuteRate + type: 0 + - field: Count + type: 0 + protocol: jmx + jmx: + # 主机host: ipv4 ipv6 域名 + host: ^_^host^_^ + # 端口 + port: ^_^port^_^ + username: ^_^username^_^ + password: ^_^password^_^ + # jmx mbean object name + objectName: kafka.server:type=BrokerTopicMetrics,name=TotalProduceRequestsPerSec + url: ^_^url^_^ \ No newline at end of file diff --git a/manager/src/main/resources/define/param/param-kafka.yml b/manager/src/main/resources/define/param/param-kafka.yml new file mode 100644 index 00000000000..245e203bbec --- /dev/null +++ b/manager/src/main/resources/define/param/param-kafka.yml @@ -0,0 +1,45 @@ +app: kafka +param: + # field-字段名称标识符 + - field: host + # name-参数字段显示名称 + name: + zh-CN: 主机Host + en-US: Host + # type-字段类型,样式(大部分映射input标签type属性) + type: host + # 是否是必输项 true-必填 false-可选 + required: true + - field: port + name: + zh-CN: 端口 + en-US: Port + type: number + # 当type为number时,用range表示范围 + range: '[0,65535]' + required: true + # 端口默认值 + defaultValue: 9999 + - field: url + name: + zh-CN: JMX URL + en-US: JMX URL + type: text + required: false + hide: true + placeholder: 'service:jmx:rmi:///jndi/rmi://host:port/jmxrmi' + - field: username + name: + zh-CN: 用户名 + en-US: Username + type: text + limit: 20 + required: false + hide: true + - field: password + name: + zh-CN: 密码 + en-US: Password + type: password + required: false + hide: true \ No newline at end of file