There are lots of ways to monitor the heap usage of a JVM, but my
recommendation would be to use the metrics subsystem [1] and export JVM
memory and GC metrics [2] via something like Prometheus [3] using this
plugin [4]. Your configuration in broker.xml would look something like this:

  <metrics>
     <jvm-memory>true</jvm-memory>
     <jvm-gc>true</jvm-gc>
     <plugin
class-name="com.redhat.amq.broker.core.server.metrics.plugins.ArtemisPrometheusMetricsPlugin"/>
  </metrics>

Tools like Prometheus provide highly configurable monitoring, alerting, and
visualization that will help you keep tabs on your broker(s) and be
proactive with management.


Justin

[1]
https://activemq.apache.org/components/artemis/documentation/latest/metrics.html#metrics
[2]
https://activemq.apache.org/components/artemis/documentation/latest/metrics.html#optional-metrics
[3] https://prometheus.io/
[4] https://github.com/rh-messaging/artemis-prometheus-metrics-plugin

On Wed, May 29, 2024 at 2:37 AM Mandadzhieva, Ayla <
ayla.mandadzhi...@dxc.com> wrote:

> Hello Justin,
>
> I am referring to JVM memory. My customer wants to get email or any other
> kind of notifications if the memory consumption has reached to some certain
> percentage.
>
> They received below error and they want to get notification before such
> problem occurs:
>
> May 27, 2024 1:49:01 PM CEST SEVERE  [com.boomi.util.LogUtil doLog]
> Unhandled exception in thread ActiveMQ Data File Writer.
> java.lang.OutOfMemoryError: Java heap space
>             at
> org.apache.activemq.store.kahadb.disk.util.DataByteArrayOutputStream.<init>(DataByteArrayOutputStream.java:49)
>             at
> org.apache.activemq.store.kahadb.disk.journal.DataFileAppender.processQueue(DataFileAppender.java:335)
>             at
> org.apache.activemq.store.kahadb.disk.journal.DataFileAppender$1.run(DataFileAppender.java:197)
> May 27, 2024 1:49:01 PM GMT+02:00 FINE
> [com.boomi.store.persist.FilePersistence openStream] Attempting to open
> output stream, id: 2024.05.27_8a479682d9b475a3, type: META
> May 27, 2024 1:49:01 PM GMT+02:00 INFO
> [com.boomi.connector.sap.listener.SAPTIDHandler commit] commit called for
> TID=0A1E5E1E491166547301252C
>
> BR,
> Ayla
>
>
> -----Original Message-----
> From: Justin Bertram <jbert...@apache.org>
> Sent: Tuesday, May 28, 2024 8:25 PM
> To: users@activemq.apache.org
> Subject: Re: How to set thresholds in ActiveMQ Artemis
>
> [You don't often get email from jbert...@apache.org. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Can you elaborate on the nature of the warnings and alerts you're asking
> about? Is this something that would appear in the log? Is it a management
> notification [1]?
>
> Also, what specific memory and storage thresholds are you referring to?
> Are you talking about JVM memory, address memory, or something else?
>
>
> Justin
>
> [1]
>
> https://activemq.apache.org/components/artemis/documentation/latest/management.html#management-notifications
>
> On Tue, May 28, 2024 at 7:59 AM Mandadzhieva, Ayla <
> ayla.mandadzhi...@dxc.com> wrote:
>
> > Hello,
> >
> > Can you please let me knowif it is possible to define warning and
> > alert thresholds for memory and storage in ActiveMQ Artemis?
> >
> > Best regards,
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@activemq.apache.org
> For additional commands, e-mail: users-h...@activemq.apache.org
> For further information, visit: https://activemq.apache.org/contact
>
>

Reply via email to