Artemis: JMX address max-size-bytes attribute?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Artemis: JMX address max-size-bytes attribute?

adirubin
Hi,
I'm setting up an Artemis 2.3 instance, monitoring using Zabbix which
periodically samples JMX. I defined some addresses, each with its own
max-size-bytes. I would like to setup an alert that'll notify me when an
address is getting full (I might change max-size-bytes from time to time). I
can't seem to find a JMX attribute for the address that tells me either its
max-size-bytes or how full is it. Is there any such thing?
My current solution, which I don't like, is to periodically read and parse
the broker.xml file.

Thanks!
Adi.




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: Artemis: JMX address max-size-bytes attribute?

jbertram
>I can't seem to find a JMX attribute for the address that tells me either
its max-size-bytes or how full is it.

For the max-size-bytes you can use the method
org.apache.activemq.artemis.api.core.management.ActiveMQServerControl#getAddressSettingsAsJSON
(passing in the name of the address you're interested in).  For the size of
the address you can use
org.apache.activemq.artemis.api.core.management.AddressControl#getAddressSize.

Hope that helps.


Justin

On Tue, Dec 19, 2017 at 8:02 AM, adirubin <[hidden email]> wrote:

> Hi,
> I'm setting up an Artemis 2.3 instance, monitoring using Zabbix which
> periodically samples JMX. I defined some addresses, each with its own
> max-size-bytes. I would like to setup an alert that'll notify me when an
> address is getting full (I might change max-size-bytes from time to time).
> I
> can't seem to find a JMX attribute for the address that tells me either its
> max-size-bytes or how full is it. Is there any such thing?
> My current solution, which I don't like, is to periodically read and parse
> the broker.xml file.
>
> Thanks!
> Adi.
>
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>
Reply | Threaded
Open this post in threaded view
|

Re: Artemis: JMX address max-size-bytes attribute?

adirubin
Hi,
Thanks! This helps.

For future readers: I'll write a script that calls Jolokia and parses the
json, and execute it using zabbix. The http call is:

curl
http://localhost:8161/jolokia/exec/org.apache.activemq.artemis:broker=\"localhost\"/getAddressSettingsAsJSON/myAddress





--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html