Universal Messaging 10.11 | Concepts | Management | JMX User Guide
 
JMX User Guide
Enabling JMX on the server
You can enable JMX on the server by using either the Enterprise Manager or the Admin API.
Using the Enterprise Manager
1. Select Realm > Config > JVM Management
2. Set the property EnableJMX to true.
Using the Admin API
Use code such as the following:
nRealmNode node = new nRealmNode(new nSessionAttributes("<UM adapter>"));
nConfigGroup config = node.getConfigGroup("JVM Management");
Enumeration changedItems = config.getItems();
while (changedItems.hasMoreElements()) {
nConfigEntry entry = (nConfigEntry) changedItems.nextElement();
if (entry.getName().equals("EnableJMX")) {
entry.setValue("true");
}
}
node.commitConfig(config);
JMX RMI Connections
If you want to connect to the JMX Bean Server remotely you can do it through the RMI Connection. By default this connection is not enabled. In order to enable the connection, do this:
1. In the Enterprise Manager, select Realm > Config > JVM Management
2. Set the property JMXRMIPort to a valid, not bound port number.
Changes will take effect immediately and no server restart is required. If the port is not available for some reason the realm server will go through the next 10 consecutive ports and will book the first free port. In order to disable the RMI, set the property to '0'.
Note:
The port is not secured in any way, so using this method to connect to the Bean Server is not recommended for a production environment.
Using a generic JMX client such as JConsole
You can connect to the PID. The process name should be com.pcbsys.nirvana.server.ServerService or similar. The beans are arranged in a tree like structure, similar to the display of assets shown in the Enterprise Manager.
Switching to Flat Namspeaces for Topics and Queues
By default, JMX namespaces for topics and queues are created using a folder tree structure, for example, Folder1=q1,Folder2=q2,destinationName=queuename, which might cause issues for some monitoring solutions.
For this reason, you can switch to flat namespaces for JMX topics and queues by using the FlatStoreJMXBeanNamespace realm configuration property, as follows:
1. In Enterprise Manager, select a realm and go to Config > JVM Management.
2. Set the FlatStoreJMXBeanNamespace property to true.
3. Disable the EnableJMX property to stop the JMX server.
4. Set EnableJMX to true again.
After you you enable the functionality, a JMX queue namespace, for example, will have the format destinationName=/q1/q2/q3.
Universal Messaging - Metrics
The following section gives details about the metrics that Universal Messaging provides.
A complete list with Universal Messaging metrics is available in the JMX Exporter configuration file jmx_exporter.yaml mentioned above.
Server Statistics
HeapMemory
Shows heap memory usage in megabytes for the realm server instance.
MemoryFree
Amount of memory used by the realm
DirectMemory
Realm direct memory usage
MemoryMax
Amount of memory available for the realm
DiskUsage
Disk usage
CPU
CPU loads from UM perspective
CurrentConnections
Number of current connections for the realm
BytesIn
Realm's number of arrived bytes
BytesOut
Realm's number of consumed bytes
TotalPublishedEvents
Number of events published on the realm
TotalConsumedCount
Number of consumed events
Cluster Metrics
ProcessQueue
The size of the queue waiting to be processed
ClientQueue
The size of the local client queue
CommsQueue
The size of the incoming cluster queue request
CurrentState
The current realm's cluster state
IsOnline
Is this realm member online to this node
Thread Pools Statistics
Idle Threads
Realm server Thread Pool Monitor Idle threads. This attribute shows the number of idle threads.
Queued Tasks
Realm server Thread Pool Monitor Queued tasks. This attribute shows the number of queued tasks.
Allocated Threads
Realm server Thread Pool Monitor allocated threads. This attribute shows the number of allocated threads.
Stalled Tasks
Realm server Thread Pool Monitor stalled tasks. This attribute shows the number of stalled tasks.
Tasks Added
Realm server Thread Pool Monitor added tasks. This attribute shows the number of added tasks.
Event Handling
TotalPublished
Number of total published events per channel, specific attribute for channel/queue
TotalConsumed
Number of consumed events per channel, specific attribute for channel/queue
NoOfEvents
Number of channel/queue events
MemoryUsage
The current memory used by the store
UsedSpace
The current space used by the store
CurrentConnections
The current number of connections to this node
TotalEvents
Durable metric, durable total number of events
Pending
Durable metric
Number of Connections (Subscribers)
Acknowledged
Durable metric, durable connection number of acknowledged events
RolledBack
Durable Metric, durable connection number of rolled back events
Pending
Durable metric, durable connection number of pending events
Queue data
TotalPublished
Number of total published events per queue, specific attribute for channel/queue
TotalConsumed
Number of consumed events per queue, specific attribute for channel/queue
NoOfEvents
Number of channel/queue events
MemoryUsage
The current memory used by the store
UsedSpace
The current space used by the store
CurrentConnections
The current number of connections to this node