Yes, I've read documentation regarding JMX management, but I had issues with configuration so decided to look into JMX exporter as a workaround.
I also saw your suggestion regarding Prometheus plugin in another thread, and will definitely try it, but I wanted to try JMX first as there are much more monitoring and alerting dashboard templates available. Most of the templates use JMX metric keys, so I thought this would save me some time later. Anyway, my original issues with JMX are: 1. Setting <connector connector-port="1099" rmi-registry-port="1099" /> produces "port already used" bind errors. I can only set these parameters to two different ports. It's not a big deal, but one needs to know that both ports needs to be allowed in the firewall then, and we have to keep in mind that RMI registry port traffic is plaintext by default. 2. If I set <connector connector-port="1099" connector-host="0.0.0.0" rmi-registry-port="1100" /> and add -Djava.rmi.server.hostname=<publicIPbeforeNAT> to artemis.profile, the broker hangs on startup for ~2 minutes and 10 seconds every time at: 2025-01-14 22:49:38,308 INFO [org.apache.activemq.artemis.core.server] AMQ221006: Waiting to obtain primary lock 2025-01-14 22:51:50,703 INFO [org.apache.activemq.artemis.core.server] AMQ221012: Using AIO Journal Looks like some kind of TCP timeout in play. Ports can match and I don't experience this delay if I use standard JVM agent instead, i.e. completely disable authorization and custom connector in management.xml, as suggested in the documentation, and use: -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.rmi.port=1099 -Djava.rmi.server.hostname=<publicIPbeforeNAT> -Dcom.sun.management.jmxremote.local.only=false These first two issues are only reproducible with Artemis' custom JMX connector. 3. Some JMX software, for example VisualVM, cannot build its window for JMX browsing unless vm* methods are added to role-access list. I didn't investigate further because of issue #2 it's too slow to debug, but I guess it's missing access to some informational actions, like maybe "vmInfo". Should I create tickets for all these issues? -- Vilius -----Original Message----- From: Justin Bertram <jbert...@apache.org> Sent: Tuesday, January 14, 2025 7:22 PM To: users@activemq.apache.org Subject: Re: JMX exporter in Docker image You can enable remote JMX connectivity by modifying management.xml as described in this documentation [1]. Of course you'd need to expose whatever port you're using for remote JMX via Docker. The thing with port 9404 does appear to be a bug. These days we recommend folks use the pluggable broker metrics [2] (for which there is a Prometheus plugin - accessible via the web port 8161). Justin [1] https://activemq.apache.org/components/artemis/documentation/latest/management.html#remote-jmx-access [2] https://activemq.apache.org/components/artemis/documentation/latest/metrics.html#metrics On Tue, Jan 14, 2025 at 3:37 AM Vilius Šumskas <vilius.sums...@rivile.lt> wrote: > Hi, > > I‘m trying to configure JMX remoting in official Artemis Docker image. > I see that Docker image has port 9404 exposed which indicates JMX > Prometheus exporter, but I cannot find any information how to activate > it or even the exporter JAR in the image itself. Is this a bug left > from > https://github.com/vromero/activemq-artemis-docker/blob/master/README. > md#57-prometheus-metrics > or I’m missing something? > > -- > Vilius > > --------------------------------------------------------------------- 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