---
title: "Terracotta Universal Messaging Solution "
description: ""
url: "https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/terracotta-universal-messaging/index.html"
---
## Introduction

As technology evolves, web and mobile platforms are becoming increasingly essential to clients and business.
 The Universal Messaging Solution enhances productivity and provides real-time alerts to support staff.
 Although the status of Terracotta Universal Messaging can be viewed through the Enterprise Manager tool supplied,
 this only provides a static view of the Cluster and no ability for automated alerts or integration with other monitoring tools.
 As more of the global FX e-platforms and banks rely on Terracotta Universal Messaging for streaming, this new plug-in enables them
 to see more and deal with issues faster than before.

## Glossary

- Cluster - a selection of at least 3 Universal Messaging Realms. The Realms work in conjunction with each other to supply
 a messaging service, in a fault tolerant load balanced way. If a Realm fails for what every reason, the other Realms in the cluster
 will continue to work as if it hadn’t failed. To achieve this goal, a single Realm is identified as a Master Node which keeps the
 status of the other Realms. If this master Realm fails, then the other Realms will vote to select a new master Realm.
- Channel - a generic name for a Topic or Queue, as defined by the JMS standard.
- Connection - a physical connection over which a message is sent.
- Realm - identifies an individual instance of a Universal Messaging Server.
- RNAME - the key to all information in the Universal Messaging API.
 This uniquely identifies a Universal Messaging instance or Realm. The RNAME is made up of three parts:

```
<protocol>://<hostname>:<port>
```

- `<protocol>` - can be one of the four available native communications protocol identifiers: nsp (socket), nhp (HTTP), nsps (SSL), and nhps (HTTPS).
- `<hostname>` - the hostname or IP address that the Universal Messaging Realm is running.
- `<port>` - the TCP port on the hostname that the Universal Messaging Realm is bound to be, using the same wire protocol.

## Technology

The Universal Messaging plug-in makes extensive use of the Terracotta Universal Messaging admin API to provide detailed,
 real-time statistics about the performance of Universal Messaging Clusters. Using this information in conjunction with Geneos
 FKM (File Keyword Monitoring) against the Universal Messaging log provides a comprehensive view of the health of your Universal Messaging Cluster.
 Rules can be set up to provide the support team with automated alerts, which frees up resources and enables swift resolution to issues.

Many people successfully use Universal Messaging as a middleware delivery mechanism for low latency applications;
 however, the technology is a blind spot for them from a monitoring point of view. Surely, they need to gather more sophisticated metrics
 from Terracotta Universal Messaging. The following sections briefly describe the views that are available.

## Prerequisites

 - Instrumentation XML-RPC API.
 - Universal Messaging Solution package with dependent libs (these are included in the lib subdirectory).
 - Universal Messaging plug-in license: `UMMonitor.lic`. Please contact [ITRS Support](https://support.itrsgroup.com/hc/en-us) for a trial licence.

## Installation

### Sampler

Set up a sampler. Ths is set up as an API plug-in.

1. Set the name to “Cluster”. If you wish to change the name, make sure that this value is used in the `UMMonitor.properties` file.
2. Set the plugin type to API.
    ```
    <sampler name="Cluster">
    <plugin>
    <api></api>
    </plugin>
    </sampler>
    ```

### Netprobe

Select a netprobe, preferably on the machine where you will be running the plug-in code. In this example, it’s called “UM probe”.

### Managed Entity

Set up a managed entity that joins the probe and the sampler.

1. Set the name to “Universal Messaging”. If you wish to change the name, make sure that this value is used in the `UMMonitor.properties` file.
2. Set Options to probe, and select the probe you set up in *Netprobe*.
3. Reference the sampler you set up in *Sampler*.

    ```
    <managedEntity name="Universal Messaging">
    <probe ref="UM probe"></probe>
    <sampler ref="Cluster"></sampler>
    </managedEntity>
    ```

### Universal Messaging Permissions

Using the Enterprise Manager, ensure that the user has full access permissions. You can do this using the command line tools:

```
./naddrealmacl <user> <server where plugin is running> full
```

### Universal Messaging Plug-in with Dependent Libs

Create a directory on the server where you are running the netprobe you want to use to monitor Universal Messaging.
 Copy the contents of the tar file to this location.

You should see the following:

```
UMMonitor/
UMMonitor.jar
lib/
log4j-1.2.16.jar
vim25.jar
ws-commons-util-1.0.2.jar
xmlrpc-client-3.1.3.jar
xmlrpc-common-3.1.3.jar
xmlrpc-server-3.1.3.jar
```

### Plug-in Configuration

By default, the plug-in uses a config file called `UMMonitor.properties`. You can specify a different config file on the command line
 or use Java properties on the command line to override properties in the config file. If there is no config file to be found,
 running the plug-in the first time will generate a default config file. Confirm that the `UMMonitor.properties` file has the correct
 settings especially:

```
netprobeServer=localhost
netprobePort=7036
```

### Logging Configuration

The logging is configured using `log4j`. By default, it is configured to log to the console and a log file (`UMMonitor.log`)
 that will roll twice a day (AM and PM).

### Initialisation

To run the `UMMonitor.jar` file:

```
java -jar UMMonitor.jar
```

## Views

### Cluster Monitor

The Cluster Monitor dataview contains the state, master, online, and can be master columns.

### Realm Monitor

![](https://docscdn.itrsgroup.com/geneos/images/integrations/terracotta-realm-monitor-dataview.png)

### Interface Monitor

![](https://docscdn.itrsgroup.com/geneos/images/integrations/terracotta-interface-monitor-dataview.png)

### Channel Monitor

![](https://docscdn.itrsgroup.com/geneos/images/integrations/terracotta-channel-monitor-dataview.png)

### Connection Monitor

![](https://docscdn.itrsgroup.com/geneos/images/integrations/terracotta-connection-monitor-dataview.png)

### Thread Monitor

![](https://docscdn.itrsgroup.com/geneos/images/integrations/terracotta-thread-monitor-dataview.png)

## Default Rules

Once the Universal Messaging monitoring is in place, the real value that Geneos brings is to allow you to create alerts that identify a
 Realm in trouble. This allows your support teams to identify a problem before it affects your business service.
 To create the alerts, you need to set up rules based on the information that is available in the data views.

## Cluster Monitoring

These values are available from the Cluster Monitor view. It’s important to build a rule that works across both the
 Master Realm and each Realm, as the two views may differ.

<div class="table-container">
<table class="legacy-table"   style="margin-left: 0;margin-right: auto;width: 100%;mc-table-style: url('../Resources/TableStyles/ref_2_col_table.css');" cellspacing="0">
                        <col style="width: 50%;" class="TableStyle-ref_2_col_table-Column-Column1"/>
                        <col style="width: 50%;" class="TableStyle-ref_2_col_table-Column-Column1"/>
                        <thead>
                            <tr class="TableStyle-ref_2_col_table-Head-Header1">
                                <th class="TableStyle-ref_2_col_table-HeadE-Column1-Header1"><strong>Rule Description</strong>
                                </th>
                                <th class="TableStyle-ref_2_col_table-HeadD-Column1-Header1"><strong>Alert Level</strong>
                                </th>
                            </tr>
                        </thead>
                        <tbody valign="top">
                            <tr class="TableStyle-ref_2_col_table-Body-Body1">
                                <td class="TableStyle-ref_2_col_table-BodyE-Column1-Body1">Highlight if less than 51% of the Realms are available &#8211; this means that Quorum cannot be reached</td>
                                <td class="TableStyle-ref_2_col_table-BodyD-Column1-Body1">Red</td>
                            </tr>
                            <tr class="TableStyle-ref_2_col_table-Body-Body1">
                                <td class="TableStyle-ref_2_col_table-BodyB-Column1-Body1">Highlight if the Master nodes view differs from the view of the individual node. E.g. if the Master believes it loses connection with one realm,
								it appears as offline, but it may just be that the connection is broken</td>
                                <td class="TableStyle-ref_2_col_table-BodyA-Column1-Body1">Amber</td>
                            </tr>
                        </tbody>
                    </table>
                
</div>

## Realm Monitoring

On each individual Realm, it is worth setting up monitoring for the following fields.

<div class="table-container">
<table class="legacy-table"   style="margin-left: 0;margin-right: auto;width: 100%;mc-table-style: url('../Resources/TableStyles/ref_2_col_table.css');" cellspacing="0">
                        <col style="width: 50%;" class="TableStyle-ref_2_col_table-Column-Column1"/>
                        <col style="width: 50%;" class="TableStyle-ref_2_col_table-Column-Column1"/>
                        <thead>
                            <tr class="TableStyle-ref_2_col_table-Head-Header1">
                                <th class="TableStyle-ref_2_col_table-HeadE-Column1-Header1"><strong>Rule Description</strong>
                                </th>
                                <th class="TableStyle-ref_2_col_table-HeadD-Column1-Header1"><strong>Alert Level</strong>
                                </th>
                            </tr>
                        </thead>
                        <tbody valign="top">
                            <tr class="TableStyle-ref_2_col_table-Body-Body1">
                                <td class="TableStyle-ref_2_col_table-BodyE-Column1-Body1">If getUsedMemory is greater than Warning memory level (default 85%)</td>
                                <td class="TableStyle-ref_2_col_table-BodyD-Column1-Body1">Amber</td>
                            </tr>
                            <tr class="TableStyle-ref_2_col_table-Body-Body1">
                                <td class="TableStyle-ref_2_col_table-BodyE-Column1-Body1">If getUsedMemory is greater than Error memory level (default 95%)</td>
                                <td class="TableStyle-ref_2_col_table-BodyD-Column1-Body1">Red</td>
                            </tr>
                            <tr class="TableStyle-ref_2_col_table-Body-Body1">
                                <td class="TableStyle-ref_2_col_table-BodyE-Column1-Body1">If getUsedMemory increases rapidly in value over three consecutive sample periods</td>
                                <td class="TableStyle-ref_2_col_table-BodyD-Column1-Body1">Red</td>
                            </tr>
                            <tr class="TableStyle-ref_2_col_table-Body-Body1">
                                <td class="TableStyle-ref_2_col_table-BodyE-Column1-Body1">Consumed per sec should not be 0</td>
                                <td class="TableStyle-ref_2_col_table-BodyD-Column1-Body1">Amber</td>
                            </tr>
                            <tr class="TableStyle-ref_2_col_table-Body-Body1">
                                <td class="TableStyle-ref_2_col_table-BodyB-Column1-Body1">The number of messages Consumed should have a near linear relationship Published value.You can use Breach Predictor to calculate this relationship.</td>
                                <td class="TableStyle-ref_2_col_table-BodyA-Column1-Body1">Amber</td>
                            </tr>
                        </tbody>
                    </table>
                
</div>

## Channel Monitoring

The following rules relate to the Channel views.

<div class="table-container">
<table class="legacy-table"   style="margin-left: 0;margin-right: auto;width: 100%;mc-table-style: url('../Resources/TableStyles/ref_2_col_table.css');" cellspacing="0">
                        <col style="width: 50%;" class="TableStyle-ref_2_col_table-Column-Column1"/>
                        <col style="width: 50%;" class="TableStyle-ref_2_col_table-Column-Column1"/>
                        <thead>
                            <tr class="TableStyle-ref_2_col_table-Head-Header1">
                                <th class="TableStyle-ref_2_col_table-HeadE-Column1-Header1"><strong>Rule Description</strong>
                                </th>
                                <th class="TableStyle-ref_2_col_table-HeadD-Column1-Header1"><strong>Alert Level</strong>
                                </th>
                            </tr>
                        </thead>
                        <tbody valign="top">
                            <tr class="TableStyle-ref_2_col_table-Body-Body1">
                                <td class="TableStyle-ref_2_col_table-BodyE-Column1-Body1">Consumed per sec should not be 0</td>
                                <td class="TableStyle-ref_2_col_table-BodyD-Column1-Body1">Amber</td>
                            </tr>
                            <tr class="TableStyle-ref_2_col_table-Body-Body1">
                                <td class="TableStyle-ref_2_col_table-BodyE-Column1-Body1">The number of messages Consumed should have a near linear relationship Published value. For example, if the Consumed value
									increased 10%, the Published value should also increase.Try to use Breach Predictor to calculate this relationship.</td>
                                <td class="TableStyle-ref_2_col_table-BodyD-Column1-Body1">Amber</td>
                            </tr>
                            <tr class="TableStyle-ref_2_col_table-Body-Body1">
                                <td class="TableStyle-ref_2_col_table-BodyE-Column1-Body1">If Published Rate or Consumed Rate increase dramatically (over 10%)</td>
                                <td class="TableStyle-ref_2_col_table-BodyD-Column1-Body1">Amber</td>
                            </tr>
                            <tr class="TableStyle-ref_2_col_table-Body-Body1">
                                <td class="TableStyle-ref_2_col_table-BodyB-Column1-Body1">If getUsedSpace &gt; 1GB, this means the storage may be persisting incorrectly.Universal Messaging supports 5 channel types:<ul><li class="table_bullets">nChannelAttributes.RELIABLE_TYPE</li><li class="table_bullets">nChannelAttributes.SIMPLE_TYPE</li><li class="table_bullets">nChannelAttributes.TRANSIENT_TYPE</li><li class="table_bullets">nChannelAttributes.MIXED_TYPE</li><li class="table_bullets">nChannelAttributes.PERSISTENT_TYPE</li></ul>The top 3 in this list are all memory-based channels, and therefore have no disk usage, so getUsedSpace relates to memory,
										and disk space will be 0. The other 2 are a bit trickier, but basically, disk usage in persistent channels is the
										getUsedSpace value. Memory can also be implied as the same (we do have a memory cache of events that has a replacement policy,
										so memory and disk may not actually be the same, but it&#8217;s a rough guide). Mixed channels support both persistent and in-memory events,
									so as such can be treated the same as persistent.</td>
                                <td class="TableStyle-ref_2_col_table-BodyA-Column1-Body1">Red</td>
                            </tr>
                        </tbody>
                    </table>
                
</div>

## Connection Monitoring

The following rules relate to the Connection views.

<div class="table-container">
<table class="legacy-table"   style="margin-left: 0;margin-right: auto;width: 100%;mc-table-style: url('../Resources/TableStyles/ref_2_col_table.css');" cellspacing="0">
                        <col style="width: 50%;" class="TableStyle-ref_2_col_table-Column-Column1"/>
                        <col style="width: 50%;" class="TableStyle-ref_2_col_table-Column-Column1"/>
                        <thead>
                            <tr class="TableStyle-ref_2_col_table-Head-Header1">
                                <th class="TableStyle-ref_2_col_table-HeadE-Column1-Header1"><strong>Rule Description</strong>
                                </th>
                                <th class="TableStyle-ref_2_col_table-HeadD-Column1-Header1"><strong>Alert Level</strong>
                                </th>
                            </tr>
                        </thead>
                        <tbody valign="top">
                            <tr class="TableStyle-ref_2_col_table-Body-Body1">
                                <td class="TableStyle-ref_2_col_table-BodyB-Column1-Body1">Alert If the getQueueSize value is always increasing</td>
                                <td class="TableStyle-ref_2_col_table-BodyA-Column1-Body1">Amber</td>
                            </tr>
                        </tbody>
                    </table>
                
</div>

## Log Monitoring

This uses the File Keyword Monitor to examine the logs and raise alerts based on the following information.
 These are the suggested Red and Amber FKM Keys to watch.

<div class="table-container">
<table class="legacy-table"   class="TableStyle-ref_4_col_table" style="width: 100%;margin-left: 0;margin-right: auto;mc-table-style: url('../Resources/TableStyles/ref_4_col_table.css');" cellspacing="0">
                        <col style="width: 25%;" class="TableStyle-ref_4_col_table-Column-Column1"/>
                        <col style="width: 25%;" class="TableStyle-ref_4_col_table-Column-Column1"/>
                        <col style="width: 25%;" class="TableStyle-ref_4_col_table-Column-Column1"/>
                        <col style="width: 25%;" class="TableStyle-ref_4_col_table-Column-Column1"/>
                        <thead>
                            <tr class="TableStyle-ref_4_col_table-Head-Header1">
                                <th class="TableStyle-ref_4_col_table-HeadE-Column1-Header1"><strong>Grep</strong>
                                </th>
                                <th class="TableStyle-ref_4_col_table-HeadE-Column1-Header1"><strong>Description</strong>
                                </th>
                                <th class="TableStyle-ref_4_col_table-HeadE-Column1-Header1"><strong>Test</strong>
                                </th>
                                <th class="TableStyle-ref_4_col_table-HeadD-Column1-Header1"><strong>Alert Level</strong>
                                </th>
                            </tr>
                        </thead>
                        <tbody valign="top">
                            <tr class="TableStyle-ref_4_col_table-Body-Body1">
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1"><code class="docutils literal"><span class="pre">Disconnected\s+from</span></code>
                                </td>
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1">This means a Realm is disconnected and should be picked up by the Cluster Monitor.</td>
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1">Shut down realm.</td>
                                <td class="TableStyle-ref_4_col_table-BodyD-Column1-Body1">Amber</td>
                            </tr>
                            <tr class="TableStyle-ref_4_col_table-Body-Body1">
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1"><code class="docutils literal"><span class="pre">Inactive\s+drivers\s+bound\s+to</span></code>
                                </td>
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1">This occurs when the network stack does not correctly report a connection closure.</td>
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1">Block traffic using firewall.</td>
                                <td class="TableStyle-ref_4_col_table-BodyD-Column1-Body1">Amber</td>
                            </tr>
                            <tr class="TableStyle-ref_4_col_table-Body-Body1">
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1"><code class="docutils literal"><span class="pre">Driver\s+inactive\s+on\s+adapter</span></code>
                                </td>
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1">This occurs when the network stack does not correctly report a connection closure.</td>
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1">Block traffic using firewall.</td>
                                <td class="TableStyle-ref_4_col_table-BodyD-Column1-Body1">Amber</td>
                            </tr>
                            <tr class="TableStyle-ref_4_col_table-Body-Body1">
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1"><code class="docutils literal"><span class="pre">Fatal</span></code>
                                </td>
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1">This is a serious error.</td>
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1">This is hard to reproduce, Tag. The next level is security, which is easy to check for. Just create a channel from one host, remove all permissions in the ACL panel for <code class="docutils literal"><span class="pre">*@*</span></code> acl entry, and run the <code class="docutils literal"><span class="pre">npubchan</span></code> example program on the channel from another host. You will see a security log message.</td>
                                <td class="TableStyle-ref_4_col_table-BodyD-Column1-Body1">Red</td>
                            </tr>
                            <tr class="TableStyle-ref_4_col_table-Body-Body1">
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1"><code class="docutils literal"><span class="pre">Logged\s+Out\s+using\s+(nsp</span><span class="pre">|</span><span class="pre">nhp</span><span class="pre">|</span><span class="pre">nsps</span><span class="pre">|</span><span class="pre">nsp)\s+session\s+established\s+for\s[0-6]?[0-9]\s+Seconds</span></code>
                                </td>
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1">Try to find the text &#8220;Logged out&#8221; using the <code class="docutils literal"><span class="pre">&lt;PROTOCOL&gt;</span></code> session established for <code class="docutils literal"><span class="pre">&lt;x&gt;</span></code> seconds.If the X seconds is less than 60, then alert.</td>
                                <td class="TableStyle-ref_4_col_table-BodyE-Column1-Body1">Start up an <code class="docutils literal"><span class="pre">APP</span></code>, and shut it down before 60 seconds is up.</td>
                                <td class="TableStyle-ref_4_col_table-BodyD-Column1-Body1">Amber</td>
                            </tr>
                            <tr class="TableStyle-ref_4_col_table-Body-Body1">
                                <td class="TableStyle-ref_4_col_table-BodyB-Column1-Body1"><code class="docutils literal"><span class="pre">ThreadPool:</span><span class="pre">&lt;&#8220;+myName+&#8221;&gt;</span><span class="pre">(&#8220;+myIdleThreadCount+&#8221;)</span><span class="pre">has</span><span class="pre">been</span><span class="pre">active</span><span class="pre">for</span><span class="pre">over</span><span class="pre">60</span><span class="pre">seconds</span></code>
                                </td>
                                <td class="TableStyle-ref_4_col_table-BodyB-Column1-Body1">Alert if the thread pool has taken 60 seconds to process.</td>
                                <td class="TableStyle-ref_4_col_table-BodyB-Column1-Body1">This will be hard to recreate.</td>
                                <td class="TableStyle-ref_4_col_table-BodyA-Column1-Body1">Red</td>
                            </tr>
                        </tbody>
                    </table>
                
</div>


