To expose metrics from ActiveMQ Artemis I'm using this plugin, and it works fine for me. There are a few metrics which I need, such as First Message Age
. Is there a way I can add it in the implementation of the plugin? Or does it need to be added in ActiveMQ itself?
To expose more attributes you'd need to modify the broker itself.
The metrics plugin implementations simply take what is exposed by the broker and put it into a format consumable by the target system (i.e. Prometheus).
To be clear, the First Message Age
attribute was intentionally not exposed due to a couple of issues:
First Message Age
simply want to use the age of the message as a way to determine whether or not messages are being consumed effectively. However, this can be deduced by inspecting other metrics. For example, if Message Count
> 0 and Consumer Count
> 0 but Messages Acknowledged
is stagnant then you likely have a stalled consumer. Tools like Prometheus have a rich query language that should be able to handle this kind of work.