Prometheus Metrics mqtt_publish_received < mqtt_publish_sent

16 views
Skip to first unread message

René Moser

unread,
Mar 24, 2022, 12:15:17 PMMar 24
to vernemq-users
Hi

We are running 1.12.3 for evaluation when we noticed that the values of two metrics doesn't make sense to us:

mqtt_publish_received is much lower (5-8 times) then mqtt_publish_sent.

isn't mqtt_publish_received the input and mqtt_publish_sent the output? If so, how can the input be lower then the output?

vernemq_message_rate.GIF

also the messages into and out of the queue differs as well. But no drops and errors? See graphs attached.

vernemq_queues.GIF

What did we miss?

Thanks for clarification.

Regards
René

André Fatton

unread,
Mar 24, 2022, 4:11:48 PMMar 24
to vernemq-users
Hi René

Thanks. Note that the publish_received counter will still be increased when you send a message to a topic (routing key) that has no subscriber. The message will then be dropped at the broker, and the publish_sent counter not increased.
(if you feel that does not explain what you are doing, let me know).

Alternatively, you could look at the queue_in and queue_out counters. Those are actually increased when a message enters and leaves a queue (ie, there's an actual subscriber owning the queue).
"sudo vmq-admin metrics show | grep queue".

I hope this helps,
Cheers,
André
Reply all
Reply to author
Forward
0 new messages