轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页
个人中心
拉取日志
交易
充值流量¥8起
我的订单
文档
工具
提交工单
页面收录
kafka-exporter

danielqsj/kafka-exporter

danielqsj
自动构建

用于Prometheus的Kafka指标导出工具,可收集Kafka集群运行指标并提供给Prometheus监控系统。

33 次收藏下载次数: 0状态:自动构建维护者:danielqsj仓库类型:镜像最近更新:4 天前
DockerHub 官方简介
轩辕镜像中文简介
下载命令
镜像标签列表与下载命令
轩辕镜像,加速的不只是镜像。
点击查看

kafka_exporter

Kafka exporter for Prometheus. For other metrics from Kafka, have a look at the https://github.com/prometheus/jmx_exporter.

Table of Contents

  • Compatibility
  • Dependency
  • Download
  • Compile
    • Build Binary
    • Build Docker Image
  • Run
    • Run Binary
    • Run Docker Image
  • Flags
    • Notes
  • Metrics
    • Brokers
    • Topics
    • Consumer Groups
  • Grafana Dashboard
  • Contribute

  • License

Compatibility

Support https://kafka.apache.org version 0.10.1.0 (and later).

Dependency

  • https://prometheus.io
  • https://shopify.github.io/sarama
  • https://golang.org
  • https://github.com/golang/dep

Download

Binary can be downloaded from https://github.com/danielqsj/kafka_exporter/releases page.

Compile

Build Binary

shell
make

Build Docker Image

shell
make docker

Docker Hub Image

shell
docker pull danielqsj/kafka-exporter:latest

It can be used directly instead of having to build the image yourself. (https://hub.docker.com/r/danielqsj/kafka-exporter\)

Run

Run Binary

shell
kafka_exporter --kafka.server=kafka:9092 [--kafka.server=another-server ...]

Run Docker Image

docker run -ti --rm -p 9308:9308 danielqsj/kafka-exporter --kafka.server=kafka:9092 [--kafka.server=another-server ...]

Flags

This image is configurable using different flags

Flag nameDefaultDescription
kafka.serverkafka:9092Addresses (host:port) of Kafka server
kafka.version1.0.0Kafka broker version
sasl.enabledfalseConnect using SASL/PLAIN
sasl.handshaketrueOnly set this to false if using a non-Kafka SASL proxy
sasl.usernameSASL user name
sasl.passwordSASL user password
sasl.mechanismSASL mechanism can be plain, scram-sha512, scram-sha256
sasl.service-nameService name when using Kerberos Auth
sasl.kerberos-config-pathKerberos config path
sasl.realmKerberos realm
sasl.keytab-pathKerberos keytab file path
sasl.kerberos-auth-typeKerberos auth type. Either 'keytabAuth' or 'userAuth'
tls.enabledfalseConnect using TLS
tls.ca-fileThe optional certificate authority file for TLS client authentication
tls.cert-fileThe optional certificate file for client authentication
tls.key-fileThe optional key file for client authentication
tls.insecure-skip-tls-verifyfalseIf true, the server's certificate will not be checked for validity
topic.filter.*Regex that determines which topics to collect
group.filter.*Regex that determines which consumer groups to collect
web.listen-address:9308Address to listen on for web interface and telemetry
web.telemetry-path/metricsPath under which to expose metrics
log.enable-saramafalseTurn on Sarama logging
use.consumelag.zookeeperfalseif you need to use a group from zookeeper
zookeeper.serverlocalhost:2181Address (hosts) of zookeeper server
kafka.labelsKafka cluster name
refresh.metadata30sMetadata refresh interval
offset.show-alltrueWhether show the offset/lag for all consumer group, otherwise, only show connected consumer groups
concurrent.enablefalseIf true, all scrapes will trigger kafka operations otherwise, they will share results. WARN: This should be disabled on large clusters
topic.workers100Number of topic workers
verbosity0Verbosity log level

Notes

Boolean values are uniquely managed by https://github.com/alecthomas/kingpin/blob/master/README.md#boolean-values. Each boolean flag will have a negative complement: --<name> and --no-<name>.

For example:

If you need to disable sasl.handshake, you could add flag --no-sasl.handshake

Metrics

Documents about exposed Prometheus metrics.

For details on the underlying metrics please see https://kafka.apache.org/documentation.

Brokers

Metrics details

NameExposed informations
kafka_brokersNumber of Brokers in the Kafka Cluster

Metrics output example

txt
# HELP kafka_brokers Number of Brokers in the Kafka Cluster.
# TYPE kafka_brokers gauge
kafka_brokers 3

Topics

Metrics details

NameExposed informations
kafka_topic_partitionsNumber of partitions for this Topic
kafka_topic_partition_current_offsetCurrent Offset of a Broker at Topic/Partition
kafka_topic_partition_oldest_offsetOldest Offset of a Broker at Topic/Partition
kafka_topic_partition_in_sync_replicaNumber of In-Sync Replicas for this Topic/Partition
kafka_topic_partition_leaderLeader Broker ID of this Topic/Partition
kafka_topic_partition_leader_is_preferred1 if Topic/Partition is using the Preferred Broker
kafka_topic_partition_replicasNumber of Replicas for this Topic/Partition
kafka_topic_partition_under_replicated_partition1 if Topic/Partition is under Replicated

Metrics output example

txt
# HELP kafka_topic_partitions Number of partitions for this Topic
# TYPE kafka_topic_partitions gauge
kafka_topic_partitions{topic="__consumer_offsets"} 50

# HELP kafka_topic_partition_current_offset Current Offset of a Broker at Topic/Partition
# TYPE kafka_topic_partition_current_offset gauge
kafka_topic_partition_current_offset{partition="0",topic="__consumer_offsets"} 0

# HELP kafka_topic_partition_oldest_offset Oldest Offset of a Broker at Topic/Partition
# TYPE kafka_topic_partition_oldest_offset gauge
kafka_topic_partition_oldest_offset{partition="0",topic="__consumer_offsets"} 0

# HELP kafka_topic_partition_in_sync_replica Number of In-Sync Replicas for this Topic/Partition
# TYPE kafka_topic_partition_in_sync_replica gauge
kafka_topic_partition_in_sync_replica{partition="0",topic="__consumer_offsets"} 3

# HELP kafka_topic_partition_leader Leader Broker ID of this Topic/Partition
# TYPE kafka_topic_partition_leader gauge
kafka_topic_partition_leader{partition="0",topic="__consumer_offsets"} 0

# HELP kafka_topic_partition_leader_is_preferred 1 if Topic/Partition is using the Preferred Broker
# TYPE kafka_topic_partition_leader_is_preferred gauge
kafka_topic_partition_leader_is_preferred{partition="0",topic="__consumer_offsets"} 1

# HELP kafka_topic_partition_replicas Number of Replicas for this Topic/Partition
# TYPE kafka_topic_partition_replicas gauge
kafka_topic_partition_replicas{partition="0",topic="__consumer_offsets"} 3

# HELP kafka_topic_partition_under_replicated_partition 1 if Topic/Partition is under Replicated
# TYPE kafka_topic_partition_under_replicated_partition gauge
kafka_topic_partition_under_replicated_partition{partition="0",topic="__consumer_offsets"} 0

Consumer Groups

Metrics details

NameExposed informations
kafka_consumergroup_current_offsetCurrent Offset of a ConsumerGroup at Topic/Partition
kafka_consumergroup_lagCurrent Approximate Lag of a ConsumerGroup at Topic/Partition

Metrics output example

txt
# HELP kafka_consumergroup_current_offset Current Offset of a ConsumerGroup at Topic/Partition
# TYPE kafka_consumergroup_current_offset gauge
kafka_consumergroup_current_offset{consumergroup="KMOffsetCache-kafka-manager-3806276532-ml44w",partition="0",topic="__consumer_offsets"} -1

# HELP kafka_consumergroup_lag Current Approximate Lag of a ConsumerGroup at Topic/Partition
# TYPE kafka_consumergroup_lag gauge
kafka_consumergroup_lag{consumergroup="KMOffsetCache-kafka-manager-3806276532-ml44w",partition="0",topic="__consumer_offsets"} 1

Grafana Dashboard

Grafana Dashboard ID: 7589, name: Kafka Exporter Overview.

For details of the dashboard please see https://grafana.com/dashboards/7589.

Contribute

If you like Kafka Exporter, please give me a star. This will help more people know Kafka Exporter.

Please feel free to send me https://github.com/danielqsj/kafka_exporter/pulls.

Contributors ✨

Thanks goes to these wonderful people:

https://github.com/danielqsj/kafka_exporter/graphs/contributors

Your *** will encourage me to continue to improve Kafka Exporter. Support Alipay ***.

License

Code is licensed under the https://github.com/danielqsj/kafka_exporter/blob/master/LICENSE.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 kafka-exporter 镜像标签

docker pull docker.xuanyuan.run/danielqsj/kafka-exporter:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull danielqsj/kafka-exporter:<标签>

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

查看流量套餐与价格
用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

镜像详情/danielqsj/kafka-exporter
充值充值流量套餐
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥8/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
用户协议·隐私政策·增值电信业务经营许可证:浙B2-20261007·©2024-2026 源码跳动©2024-2026 杭州源码跳动科技有限公司·商务合作:点击复制邮箱

更多 kafka-exporter 镜像推荐

kafka-exporter logo

bluespireinc/kafka-exporter

bluespireinc
bluespireinc/kafka-exporter是基于danielqsj/kafka-exporter的Apache Zookeeper容器镜像,用于bluespireinc Helm图表,与其他消息组件结合提供完整事件驱动平台,适合企业生产环境使用。
58.5万 次下载
6 年前更新
kafka-exporter logo

soveren/kafka-exporter

soveren
暂无描述
5.3万 次下载
2 年前更新
kafka-exporter logo

apecloud/kafka-exporter

apecloud
暂无描述
2.8万 次下载
2 年前更新
kafka-exporter logo

databahndockerhub/kafka-exporter

databahndockerhub
kafka-exporter
2.6万 次下载
7 个月前更新
kafka-exporter logo

objectrocket/kafka-exporter

objectrocket
暂无描述
2.4万 次下载
5 年前更新
kafka-exporter logo

foxdalas/kafka-exporter

foxdalas
暂无描述
1.7万 次下载
3 年前更新

查看更多 kafka-exporter 相关镜像

更多相关 Docker 镜像与资源

以下是 danielqsj/kafka-exporter 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:

  • bitnami/kafka Docker 镜像说明
  • apache/kafka Docker 镜像说明
  • wurstmeister/kafka Docker 镜像说明
  • bitnamicharts/kafka Docker 镜像说明(Kafka 消息队列,Bitnami Charts 版本,适合 Kubernetes 部署)
  • ubuntu/kafka Docker 镜像说明(Kafka 消息队列,基于 Ubuntu,适合生产环境)