Tigase Server monitoring next step - remote monitoring via JMX/RMI, SNMP, HTTP


Artur Hefczyc TigaseTeam
Added almost 9 years ago

A few weeks ago I have written the article about active service monitoring in the Tigase server via XMPP. This mechanism allows for sending alerts to a selected set of JIDs. It allows also to pull statistics from the server on demand. It is very convenient way because you can track the server activity using any XMPP client. You can also receive warnings while you are online.

I received a good feedback about this feature but also some people pointed me out that it would be extremely useful to do remote monitoring of the service via different protocols as well. This would allow to integrate the Tigase server monitoring with external automated systems.

I have been working hard for a few last weeks to fulfill those requests and now all the basic server statistics are accessible via JMX framework as MBeans.  As MBeans they are automatically available to any JMX server. There are 3 servers available with the Tigase server: JMX/RMI default Java server. This protocol gives you the most flexibility and most control over the server. It allows not only to passively watch the server activity but also you can change the server parameters and interact with the system.

Two more JMX servers are available as well exposing data via SNMP and HTTP.

The SUNs library openDMK which offers these two more JMX servers for SNMP and HTTP protocols allows for active interaction to some extent. You can have all JMX servers active at the same time or just one of them, depending on what you want or need.

At the moment all basic statistics are exposed and available to track: load for all the server components (Session Manager, Message Router, PubSub, MUC, C2S, S2S, Bosh), number of network connections (client, server and Bosh), number of active user sessions, number of registered users, system statistics like uptime, used memory and so on.

All you now need is a proper tools to collect the data via a protocol which suits you best. For JMX/RMI communication you can use JConsole tool which is included with Java JDK. It gives you a full access to all functionality and full control over the monitored application. HTTP protocol might not be the best choice for automatic monitoring but it works well if you want just to have a look what is going on. Use your preferred web browser for this. I don't know SNMP tools at all so I can not recommend anything. There is one a very simple but handy application to do a quick manual checking via SNMP called JMibBrowser. Pure Java application, easy to install and use. Unfortunately functionality offered is very basic.

The next step would be.... I guess, adding the server configuration and make the server configurable via JMX services...