首页 > 其他分享 >kafka集群监控EFAK搭建

kafka集群监控EFAK搭建

时间:2023-08-07 14:12:16浏览次数:46  
标签:EFAK efak kafka ssl 集群 ###################################### sasl cluster1

源码包准备

     1.上传包

     

     export KE_HOME=/home/secure/prom/kafka-eagle-bin-3.0.1/efak-web-3.0.1
     export PATH=$PATH:$KE_HOME/bin

     source /etc/profile

     2.安装mysql

       

 EFAK配置修改

        

        1.修改连接zk地址

        2.修改mysql连接地址

        cluster1.zk.list=10.30.92.70:2181,10.30.92.71:2181,10.30.92.73:2181

        cluster1.zk.list=10.30.92.70:2181,10.30.92.71:2181,10.30.92.73:2181/kafka

        zk.list后面要不要加/kafka需要看具体情况来设置  如果是kafka和zk已经运行一段时候后再来安装EFAK的话就不要加 否则EFAK抓取不到kafka集群数据

      

[secure@kddos-node-5 conf]$ vi system-config.properties 

######################################
# multi zookeeper & kafka cluster list
# Settings prefixed with 'kafka.eagle.' will be deprecated, use 'efak.' instead
######################################
efak.zk.cluster.alias=cluster1
cluster1.zk.list=10.30.92.70:2181,10.30.92.71:2181,10.30.92.73:2181

######################################
# zookeeper enable acl
######################################
cluster1.zk.acl.enable=false
cluster1.zk.acl.schema=digest
cluster1.zk.acl.username=test
cluster1.zk.acl.password=test123

######################################
# broker size online list
######################################
cluster1.efak.broker.size=20

######################################
# zk client thread limit
######################################
kafka.zk.limit.size=16

######################################
# EFAK webui port
######################################
efak.webui.port=8048

######################################
# EFAK enable distributed
######################################
efak.distributed.enable=false
efak.cluster.mode.status=master
efak.worknode.master.host=localhost
efak.worknode.port=8085

######################################
# kafka jmx acl and ssl authenticate
######################################
cluster1.efak.jmx.acl=false
cluster1.efak.jmx.user=keadmin
cluster1.efak.jmx.password=keadmin123
cluster1.efak.jmx.ssl=false
cluster1.efak.jmx.truststore.location=/data/ssl/certificates/kafka.truststore
cluster1.efak.jmx.truststore.password=ke123456

######################################
# kafka offset storage
######################################
cluster1.efak.offset.storage=kafka
cluster2.efak.offset.storage=zk

######################################
# kafka jmx uri
######################################
cluster1.efak.jmx.uri=service:jmx:rmi:///jndi/rmi://%s/jmxrmi

######################################
# kafka metrics, 15 days by default
######################################
efak.metrics.charts=true
efak.metrics.retain=15

######################################
# kafka sql topic records max
######################################
efak.sql.topic.records.max=5000
efak.sql.topic.preview.records.max=10

######################################
# delete kafka topic token
######################################
efak.topic.token=keadmin

######################################
# kafka sasl authenticate
######################################
cluster1.efak.sasl.enable=false
cluster1.efak.sasl.protocol=SASL_PLAINTEXT
cluster1.efak.sasl.mechanism=SCRAM-SHA-256
cluster1.efak.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="kafka" password="kafka-eagle";
cluster1.efak.sasl.client.id=
cluster1.efak.blacklist.topics=
cluster1.efak.sasl.cgroup.enable=false
cluster1.efak.sasl.cgroup.topics=
cluster2.efak.sasl.enable=false
cluster2.efak.sasl.protocol=SASL_PLAINTEXT
cluster2.efak.sasl.mechanism=PLAIN
cluster2.efak.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="kafka" password="kafka-eagle";
cluster2.efak.sasl.client.id=
cluster2.efak.blacklist.topics=
cluster2.efak.sasl.cgroup.enable=false
cluster2.efak.sasl.cgroup.topics=

######################################
# kafka ssl authenticate
######################################
cluster3.efak.ssl.enable=false
cluster3.efak.ssl.protocol=SSL
cluster3.efak.ssl.truststore.location=
cluster3.efak.ssl.truststore.password=
cluster3.efak.ssl.keystore.location=
cluster3.efak.ssl.keystore.password=
cluster3.efak.ssl.key.password=
cluster3.efak.ssl.endpoint.identification.algorithm=https
cluster3.efak.blacklist.topics=
cluster3.efak.ssl.cgroup.enable=false
cluster3.efak.ssl.cgroup.topics=

######################################
# kafka sqlite jdbc driver address
######################################
#efak.driver=org.sqlite.JDBC
#efak.url=jdbc:sqlite:/hadoop/kafka-eagle/db/ke.db
#efak.username=root
#efak.password=www.kafka-eagle.org

######################################
# kafka mysql jdbc driver address
######################################
efak.driver=com.mysql.cj.jdbc.Driver
efak.url=jdbc:mysql://10.32.3.2:3306/ke?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
efak.username=root
efak.password=82R
View Code

 

 KAFKA配置文件修改

      

[root@instance bin]# vi kafka-server-start.sh 

#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

if [ $# -lt 1 ];
then
        echo "USAGE: $0 [-daemon] server.properties [--override property=value]*"
        exit 1
fi
base_dir=$(dirname $0)

if [ "x$KAFKA_LOG4J_OPTS" = "x" ]; then
    export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../config/log4j.properties"
fi

if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
    export KAFKA_HEAP_OPTS="-Xmx16G -Xms16G -Djava.rmi.server.hostname=10.30.92.70"
    export JMX_PORT="9999"
fi

EXTRA_ARGS=${EXTRA_ARGS-'-name kafkaServer -loggc'}

COMMAND=$1
case $COMMAND in
  -daemon)
    EXTRA_ARGS="-daemon "$EXTRA_ARGS
    shift
    ;;
  *)
    ;;
esac

exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka "$@"
View Code
[secure@taishi supervisor]$ cd /data/soc/kafka/kafka_2.13-3.5.0/bin
[secure@taishi bin]$ vi kafka-server-start.sh

#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

if [ $# -lt 1 ];
then
        echo "USAGE: $0 [-daemon] server.properties [--override property=value]*"
        exit 1
fi
base_dir=$(dirname $0)

if [ "x$KAFKA_LOG4J_OPTS" = "x" ]; then
    export KAFKA_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/../config/log4j.properties"
fi

if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
    export KAFKA_HEAP_OPTS="-Xmx16G -Xms16G -Djava.rmi.server.hostname=10.30.92.71"
    export JMX_PORT="9999"
fi

EXTRA_ARGS=${EXTRA_ARGS-'-name kafkaServer -loggc'}

COMMAND=$1
case $COMMAND in
  -daemon)
    EXTRA_ARGS="-daemon "$EXTRA_ARGS
    shift
    ;;
  *)
    ;;
esac

exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka "$@"
节点2kafka配置

   重启kafka

EFAK启动服务

       $KE_HOME/bin/ke.sh start/stop/restart

        

      2.查看监控页面

       

       

      部署成功

标签:EFAK,efak,kafka,ssl,集群,######################################,sasl,cluster1
From: https://www.cnblogs.com/yxh168/p/17611030.html

相关文章

  • 集群的水平扩展和垂直扩展有什么区别?
    水平扩展(HorizontalScaling)和垂直扩展(VerticalScaling)是两种常见的扩展方法,用于提高系统的性能和容量。它们在集群中用于增加计算资源,但采用不同的方式实现。 1.水平扩展(HorizontalScaling)水平扩展是通过增加集群中的节点数量来增加系统的容量和性能。在水平扩展中,将新的......
  • Redis 2.8主从集群及故障自动切换(转载)
    Redis2.8主从集群及故障自动切换Redis官网:https://redis.io/一、架构操作系统:Debian7Master:127.0.0.1,端口:6379Slave1::127.0.0.1,端口:6378Slave2::127.0.0.1,端口:6377Sentinel1:127.0.0.1,端口:26379Sentinel2:127.0.0.1,端口:26378Sentinel3:127.0.0.1,端口:26377二、主从配置1、下载redis压......
  • Kubernetes高可用集群二进制部署(一)主机准备和负载均衡器安装
    Kubernetes(简称为:k8s)是Google在2014年6月开源的一个容器集群管理系统,使用Go语言开发,用于管理云平台中多个主机上的容器化的应用,Kubernetes的目标是让部署容器化的应用简单并且高效,Kubernetes提供了资源调度、部署管理、服务发现、扩容缩容、监控,维护等一整套功能,努力成为跨主机集......
  • 使用kubeadm快速部署一个k8s集群
    1.部署Kubernetes集群方式(1)kubeadmKubeadm是一个K8s部署工具,提供kubeadminit和kubeadmjoin,用于快速部署Kubernetes集群。官方地址:https://kubernetes.io/zh-cn/docs/reference/setup-tools/kubeadm/(2)二进制包从github下载发行版的二进制包,手动部署每个组件,组成Kube......
  • 两台服务器redis 3.0.5分布式集群安装部署
    两台服务器redis3.0.5分布式集群安装部署目前redis支持的cluster特性:1):节点自动发现2):slave->master选举,集群容错3):Hotresharding:在线分片4):集群管理:clusterxxx5):基于配置(nodes-port.conf)的集群管理6):ASK转向/MOVED转向机制.一、redis集群安装两台电脑:   192.......
  • MongoDB安装部署、集群和分片
    MongoDB安装部署、集群和分片目录一、    Mongo安装、启动和关闭1. MongoDB安装下载MongoDB压缩包 解压tar–zxvfmongodb-linux-x86_64-rhel62-3.2.4.tgz将解压包拷贝到指定目录Mvmongodb-linux-x86_64-rhel62-3.2.4 /usr/local/mongodb在~/.bashrc添加exportPATH=/u......
  • 【我和openGauss的故事】为集群实现VIP
    【我和openGauss的故事】为集群增加VIPlqkittenopenGauss2023-08-0418:01发表于四川openGauss发布以来,原生支持一主多备,RTO<10S,高可用性能大大增强。自openGauss3.0开始,更新了集群管理套件CM,易用性也得到了提高。但对于客户端来说,数据库端的切换,需要手工完成。openGauss增加VI......
  • kafka 入门最佳实践
    认识kafkakafka简介Kafka是一个分布式流媒体平台,kafka官网:http://kafka.apache.org/(1)流媒体平台有三个关键功能:发布和订阅记录流,类似于消息队列或企业消息传递系统。以容错的持久方式存储记录流。记录发生时处理流。(2)Kafka通常用于两大类应用:构建可在系统或应用程序之......
  • Windows11使用docker desktop安装kafka&zookeeper集群
    docker-compose安装zookeeper集群参考文章:http://t.csdn.cn/TtTYIhttps://blog.csdn.net/u010416101/article/details/122803105?spm=1001.2014.3001.5501准备工作:​ 在开始新建集群之前,新建好文件夹,用来挂载kafka、zookeeper数据,如下:zookeeper文件夹D:\soft\docker\zookee......
  • Zookeeper 集群 + Kafka 集群
    目录一、Zookeeper概述1.Zookeeper定义2.Zookeeper工作机制3.Zookeeper特点4.Zookeeper数据结构5.Zookeeper应用场景6.Zookeeper选举机制(1)第一次启动选举机制(2)非第一次启动选举机制二、部署Zookeeper集群一、Zookeeper概述1.Zookeeper定义Zookeeper是一个开......