Hi All,
We are using metrics to check if messages are stuck in ActiveMQ Artemis queues.
One of these metrics is first message age attribute.
For example, IBM MQ has similar metric. It returns oldest message age if queue
monitoring is turned on and returns 0 when queue is empty.
When we tried to implement similar approach for Artemis, we faced a problem.
This attribute is empty if there are no messages in the queue.
I cannot figure out how to make an alert fire when this attribute is greater
than threshold, and return to normal when there are no messages in the queue.
We are using Prometheus with JMX exporter. I tried to write complex PromQL
queries like:
absent(artemis_first_message_age{broker="broker_name ") * 0 or
artemis_first_message_age{broker="broker_name"} > 0
But it does not work because absent() function returns only one value for all
series of the metric (and returns nothing if any value is present).
And it is not possible to write all queue names (including dynamic queues or
queues which will be defined in the future) in the alert definition.
Is it possible to make broker return zero first message age when there are no
messages in the queue?
--
Best regards,
Aleksandr Milovidov
-----------------------------------
This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure. If you are not the intended recipient any
use, distribution, copying or disclosure is strictly prohibited. If you have
received this message in error, please notify the sender immediately either by
telephone or by e-mail and delete this message and any attachment from your
system. Correspondence via e-mail is for information purposes only. AO
Raiffeisenbank neither makes nor accepts legally binding statements by e-mail
unless otherwise agreed.
-----------------------------------