deadtrickster / prometheus_rabbitmq_exporter

Prometheus.io exporter as a RabbitMQ Managment Plugin plugin
MIT License
291 stars 72 forks source link

No stats for exchange to exchange bindings #91

Closed hrobertson closed 5 years ago

hrobertson commented 5 years ago

Thanks @deadtrickster for this plugin.

My topology includes exchanges bound to other exchanges but all of the rabbitmq_exchange_messages_* metrics for these exchanges are 0. The counters are only non-zero for the exchange that messages are initially published into.

Here's an example: All messages are initially published into Headers exchange A.

Headers exchange B is bound to A with argument HeaderX: "foo" Queue C is bound to B with argument HeaderY: "foo" Queue D is bound to B with argument HeaderY: "bar"

Headers exchange E is bound to A with argument HeaderX: "bar" Queue F is bound to E with argument HeaderY: "foo" Queue G is bound to E with argument HeaderY: "bar"

Say 4 messages are published to A, one for each permutation of HeaderX and HeaderY so one each is routed into C, D, F, and G.

Metrics are as follows:

rabbitmq_exchange_messages_published_total{vhost="/",exchange="A",type="headers"} 0
rabbitmq_exchange_messages_published_total{vhost="/",exchange="B",type="headers"} 0
rabbitmq_exchange_messages_published_total{vhost="/",exchange="E",type="headers"} 0
rabbitmq_exchange_messages_published_in_total{vhost="/",exchange="A",type="headers"} 4
rabbitmq_exchange_messages_published_in_total{vhost="/",exchange="B",type="headers"} 0
rabbitmq_exchange_messages_published_in_total{vhost="/",exchange="E",type="headers"} 0
rabbitmq_exchange_messages_published_out_total{vhost="/",exchange="A",type="headers"} 4
rabbitmq_exchange_messages_published_out_total{vhost="/",exchange="B",type="headers"} 0
rabbitmq_exchange_messages_published_out_total{vhost="/",exchange="E",type="headers"} 0

All other rabbitmq_exchange_messages_* metrics are 0.

I would expect the above metrics for exchanges B and E to both have value 2.

Also, why is rabbitmq_exchange_messages_published_total{exchange="A"} 0 when rabbitmq_exchange_messages_published_in_total{exchange="A"} and rabbitmq_exchange_messages_published_out_total{exchange="A"} are both 4?

Thanks

hrobertson commented 5 years ago

I have found that E2E bindings are just rows in the routing table and do not produce metrics. Closing.