Closed smitra2020 closed 2 years ago
Thanks, @smitra2020. We'll try to reproduce it as soon as we can. It would be really helpful if you could try with a previous version (such as 1.6.0) to know if we have introduced a bug in 1.7.0.
Hi @smitra2020,
I see two separate issues here.
Unable to send metrics from adapter into kafka
Unless you're running prometheus-kafka-adapter with network: host
, there isn't a kafka broker listening on localhost:9093
.
Solutions:
Deploy a kafka broker as a docker-compose container along with prometheus-kafka-adapter.
Change KAFKA_BROKER_LIST
environment variable value to your docker bridge IP (you can find it with ifconfig
) or if you're using macOS, then change it to docker.for.mac.localhost
. Please note you should change your kafka advertiser listeners to match the new hostname.
Unable to parse value (NaN)
Can you attach your prometheus server config for further investigation?
Thanks, Javier.
@smitra2020 were you able to solve the issue?
Installed adapter with a docker-compose Here is the docker-compose file used:
kafka broker running on 9093 port and topic metrics are in good health. Through a console producer, I can push messages to the topic. However, prom-kafka-adapter is not sending metric to the topic "metric". From prometheus to adapter, flow is working fine. We also do not see any error in the adapter log explaining why the adapter is not able to send message in the kafka topic. Please suggest. To check the log in docker, I was using the below command. docker logs prometheus_kafka_adapter -f
Here is the adapter log, sometimes, we are getting JSON parser error: