Replies: 1 comment 1 reply
-
That is not the case. If you want the KAfka Exporter service, you have to create one manually.
You should probably ask in some Metricbeat forum if you can point them to the pods directly in some way. You cannot scrape metric through a service, because the service takes you randomly to one of the pods backing it. So if you go through the service to actually scrape the metrics, then you would be scraping one random pod while you need to scrape all of them. I expect what Metricbeat does is that they use the service to discover the pods and connect tot he pods directly. So what you do with the annotation is a weird cycle. You annotate a pod with annotation telling Metricbeat to use the service which will take it again to exactly the same pod where it first discovered the annotation. Not saying this cannot work, but there is clearly one unnecessary step because Metricbeat already knows about the pod when it reads the annotation from it ;-). So if you cut the useless middle step, you will not need the Kafka Exporter service. |
Beta Was this translation helpful? Give feedback.
-
Hi Strimzi Community,
Thanks for the wonderful work.
It seems Strimzi > 0.20.0, Kafka exporter service is removed.
However, From this discussion, it seems like we can create the service through the template.
I am wondering is there any example that I can refer to for creating the Kafka exporter service.
Why I ask this (My Usecase)
I am using hint based autodiscovery of metric beat for scraping the metrics from kubernetes pods. Hence, I am using the pod template in the kafka crd for auto discovery annotation. my kafka cluster crd looks like this.
The Metricbeat uses the below annotations to scrape the pods through services. However, since Kafkaexporter does not create the service, I cannot scrape the kafka exporter metrics (consumer lag etc). Hence, would like to know about creating the kafka exporter service for metricbeat to scrape.
Or do you have any other opinion how to scrape the metrics with metricbeat from kafkaexporter?
Hint based metricbeat annotations
My Kafka.yaml strimzi version 0.31.0
Beta Was this translation helpful? Give feedback.
All reactions