[英]Configuring Kafka-zookeeper cluster in Prometheus Discovery(Using Strimzi Kafka cluster)
我有一個使用Strimzi cluster-operator運行的Kafka-zookeeper集群。 為此,我遵循了http://strimzi.io/docs/master/ 。 可從端口9404獲得kafka和zookeeper的度量標准。我必須將此群集設置配置為Prometheus進行監視。 Strimzi本身也具有用於配置Prometheus的KB( http://strimzi.io/docs/master/#assembly-metrics-deployment-configuration-kafka )。 但是我的問題是,無法根據群集的KB配置群集,因為在Prometheus設置中,我必須配置服務監視器以發現應用程序,並且需要在其服務中指定指標可用端口。 但是我找不到任何解決方案。 正在請求幫助...
當前的實現已經在Kafka和Zookeeper服務上設置了Prometheus批注(它們分別稱為my-cluster-kafka-bootstrap
和my-cluster-zookeeper-client
)。 這些注釋是:
prometheus.io/路徑/ metrics prometheus.io/端口9404 prometheus.io/scrape true
但是要擁有它們,您需要啟用指標。 可以通過在Kafka和Zookeeper集群的Kafka
資源中設置metrics
字段來實現。 您可以在此處找到更多信息: http : //strimzi.io/docs/master/#assembly-metrics-deployment-configuration-kafka 。
此外,該存儲庫還為您提供了一個啟用了指標的Kafka集群示例。 它在這里: https : //github.com/strimzi/strimzi-kafka-operator/blob/master/metrics/examples/kafka/kafka-metrics.yaml 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.