【问题标题】:Apache Kafka brokers not sending metrics to Confluent Control PanelApache Kafka 代理未将指标发送到 Confluent 控制面板
【发布时间】:2018-11-28 17:34:11
【问题描述】:

我已经部署了一个包含 5 个代理的 Apache Kafka 集群,其中包含图像 confluentinc/cp-enterprise-kafka 和一个包含 confluentinc/cp-enterprise-control-center 图像的 Confluent 控制面板容器,寻求以下说明https://docs.confluent.io/current/installation/docker/docs/quickstart.html#getting-started-with-docker-client

我在每个节点中激活了如下指标支持,并重新启动了它们:

##################### Confluent Metrics Reporter #######################
# Confluent Control Center and Confluent Auto Data Balancer integration
#
# Uncomment the following lines to publish monitoring data for
# Confluent Control Center and Confluent Auto Data Balancer
# If you are using a dedicated metrics cluster, also adjust the settings
# to point to your metrics kakfa cluster.
metric.reporters=io.confluent.metrics.reporter.ConfluentMetricsReporter
confluent.metrics.reporter.bootstrap.servers=localhost:9092
#
# Uncomment the following line if the metrics cluster has a single broker
#confluent.metrics.reporter.topic.replicas=1

##################### Confluent Proactive Support ######################
# If set to true, and confluent-support-metrics package is installed
# then the feature to collect and report support metrics
# ("Metrics") is enabled.  If set to false, the feature is disabled.
#
confluent.support.metrics.enable=true

但是:

  • 我在 KafkaConfig 日志部分得到一个 metric.reporters = []。

  • 我在 Confluent 控制中心日志中收到此警告:

    [2018-06-19 16:56:35,739] WARN broker=1008 未使用 ConfluentMetricsReporter (io.confluent.controlcenter.healthcheck.HealthCheck) 进行检测

    [2018-06-19 16:56:35,739] WARN broker=1009 未使用 ConfluentMetricsReporter (io.confluent.controlcenter.healthcheck.HealthCheck) 进行检测

    [2018-06-19 16:56:35,739] WARN broker=1006 未使用 ConfluentMetricsReporter (io.confluent.controlcenter.healthcheck.HealthCheck) 检测

    [2018-06-19 16:56:35,739] WARN broker=1010 未使用 ConfluentMetricsReporter (io.confluent.controlcenter.healthcheck.HealthCheck) 检测

    [2018-06-19 16:56:35,739] WARN broker=1007 未使用 ConfluentMetricsReporter (io.confluent.controlcenter.healthcheck.HealthCheck) 检测

显然,我得到的是火箭图像

我已按照以下说明进行操作,但没有。

这是我用来运行 Apache Kafka 容器的 Docker 命令:

docker run -d --net=confluent  --name=kafka1 -e KAFKA_ZOOKEEPER_CONNECT=zookeeper1:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka1:9092 confluentinc/cp-enterprise-kafka

有人可以帮帮我吗?

【问题讨论】:

    标签: apache-kafka confluent-platform


    【解决方案1】:

    我会指出显而易见的。

    每个代理都需要配置该属性文件,而不仅仅是一个。

    每次更改该文件后,您都需要重新启动 Kafka。由于您使用的是 Docker,因此您需要注意不要删除 Kafka 主题数据(例如,使用卷挂载)

    您需要将所有五个引导服务器的逗号分隔列表放在行中,以供指标报告者使用,而不仅仅是 localhost

    【讨论】:

    • 非常感谢您抽出宝贵时间 :) 我在每个 server.properties 代理中设置了这个:confluent.metrics.reporter.bootstrap.servers=kafka1:9092,kafka2:9092,kafka3:9092,kafka4 :9092,kafka5:9092 但我在每个代理日志中再次获得 metric.reporters = [] 。另外,我收到以下警告:[2018-06-20 09:41:30,269] WARN broker=1010 未使用 ConfluentMetricsReporter (io.confluent.controlcenter.healthcheck.HealthCheck) 最好的问候
    • 你是如何将属性文件放入容器中的?
    • 例如,在快速入门中,容器的环境变量是您设置这些属性的方式,而不是使用卷挂载文件。 docs.confluent.io/current/installation/docker/docs/…
    • 请原谅我的无知,但为什么使用数量来衡量指标很重要?
    • 不是。这对于数据持久性很重要。否则,您重新启动容器(例如 Kafka 进程停止),您会立即丢失数据。这就是为什么人们通常不将有状态应用程序作为容器运行
    猜你喜欢
    • 2021-10-14
    • 1970-01-01
    • 2021-05-16
    • 2022-11-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多