Sunday, January 25, 2015

Monitor ActiveMQ Nodes Using JMX

Introduction

In my previous post, http://ggl-consulting.blogspot.com/2015/01/configure-activemq-for-high-available.html, I have demonstrate in detail about how to configure ActiveMQ for high-availability using Master-Slave Paradigm. In this post, I will demonstrate the process to setup jVisualVM to monitoring all ActiveMQ instances in the cluster.

jVisualVM Setup

jVisualVM is a tool from JDK. This is a very powerful visual tool to monitor java process, create thread and memory dumps, display dashboard, etc. It is much powerful than jconsole which also comes with JDK.

To start jVisualVM, simple execute the following command [assume JDK is installed and jVisualVM is in your path]:

jvisualvm

As shown in the above figure, if you run for the first time the jvisualvm, you will need to install MBean plugin by Tool-->Available Plugins. In my case, I have already installed the plugin, so that the available plugins only show 15 items.

Once the MB plugin is installed, we can add jmx connections. In my case, I will need to add the following 4 connections:

service:jmx:rmi:///jndi/rmi://sandboxfusev01:11099/jmxrmi
service:jmx:rmi:///jndi/rmi://sandboxfusev01:12099/jmxrmi
service:jmx:rmi:///jndi/rmi://sandboxfusev02:11099/jmxrm
service:jmx:rmi:///jndi/rmi://sandboxfusev02:12099/jmxrm

After that I can see connections as the following

If I browe all 4 connections, I can see only the north ActiveMQ node from sandboxfusev01 is active. The other three node will show information like this:

This is indicating that 3 ActiveMQ nodes are in standby modes or they are slaves.

No comments:

Post a Comment

Anypoint Studio Error: The project is missing Munit lIbrary to run tests

Anypoint Studio 7.9 has a bug. Even if we following the article: https://help.mulesoft.com/s/article/The-project-is-missing-MUnit-libraries-...