Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input.kafka 配置多个kafka集群时,会出现cluster label覆盖的情况 #68

Closed
xiaoziv opened this issue Jul 6, 2022 · 0 comments

Comments

@xiaoziv
Copy link
Contributor

xiaoziv commented Jul 6, 2022

Relevant config.toml

[[instances]]
labels = { cluster="clusterA" }

# log level only for kafka exporter
log_level = "error"

# Address (host:port) of Kafka server.
kafka_uris = ["clusterA:9092"]

[[instances]]
# # interval = global.interval * interval_times
# interval_times = 1

# append some labels to metrics
# cluster is a preferred tag with the cluster name. If none is provided, the first of kafka_uris will be used
labels = { cluster="clusterB" }

# log level only for kafka exporter
log_level = "error"

# Address (host:port) of Kafka server.
kafka_uris = ["clusterB:9092"]

Logs from categraf

xxx cluster=clusterB ...
xxx cluster=clusterB ...
xxx cluster=clusterB ...
xxx cluster=clusterB ...

System info

categraf v0.1.12

Docker

No response

Steps to reproduce

  1. 配置kafka.input
  2. ./categraf --test --inputs kafka:kafka 查看输出

Expected behavior

同时能查看clusterA clusterB的topic数据

Actual behavior

实际只有clusterB标签的数据

Additional info

No response

xiaoziv pushed a commit to xiaoziv/categraf that referenced this issue Jul 6, 2022
ysyneu added a commit that referenced this issue Jul 6, 2022
…rwrite

fix input kafka cluster label overwrite bug (#68)
@ysyneu ysyneu closed this as completed Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants