Telefonica / prometheus-kafka-adapter

Use Kafka as a remote storage database for Prometheus (remote write only)
Apache License 2.0
364 stars 135 forks source link

Exported metrics all are zero #41

Closed liuzhen closed 4 years ago

liuzhen commented 4 years ago

Hi, I was hoping to get the counter metrics of "metrics points sent to kafka", but all I got are:

Is this feature broken or working as designed?

palmerabollo commented 4 years ago

Hi @liuzhen. I'm not sure if I understand your question. You'll get the metrics you configure in your prometheus' remote_write section. Are those metrics (i.e. metrics points sent to kafka) available in your prometheus? In that case, you should see them in Kafka as well.

jpfe-tid commented 4 years ago

http_requests_total should increment on each successful remote write request received by the adapter.

https://github.com/Telefonica/prometheus-kafka-adapter/blob/d430b12d27810ecee67d5eaf6f87f6693c1eac60/handlers.go#L34

After a review of git history, queueSize was never implemented, probably because an internal queue was deprecated before open sourcing the adapter, therefore it is a leftover.

jpfe-tid commented 4 years ago

@liuzhen if you see http_requests_total equal to zero, could you share the version and enviromnent used so we can try to reproduce it?

liuzhen commented 4 years ago

Thanks. We tested with more instances, and http_requests_total works now.