Openfire How To

 

This page will guide you through the steps to installing a Zapcat agent in an Openfire XMPP server. This is not quite as simple as it is to set up a monitor for a Tomcat or JBoss servlet engine. Still, I hope that these instructions will get you started quickly.


First, we will install the plugin in Openfire. This is simple enough, but there are some details about configuration and logging that need to be considered. We will change the port number to show how Zapcat can be configured from within Openfire.




For this tutorial, you need to have your Openfire server up and running, plus of course Zabbix. I will assume that you are reasonably familiar with both these products.


Below is the setup that we will use for this tutorial.



Installing the Zapcat Plugin

Download the Zapcat distribution from SourceForge and extract the openfire plugin from the zip file. It is the JAR file whose name starts with zapcat-openfire.


Open a web browser and go to the administration console of you Openfire server. Log in and click on the “Plugins” tab.


At the bottom of the page, you will see a file selection widget that you can use to upload the plugin to your Openfire server. Once you uploaded the plugin, you should be greeted by a message saying that that plugin was uploaded.


With a bit of luck, you will also see the Zapcat plugin in the list of plugins. This may take a few seconds, though. Just click on the “Plugins” tab again to reload the page.


You can now switch over to Zabbix and start setting up your monitoring of the JVM under Openfire.


Openfire itself has no interesting mbeans to look at, so you’ll just have to live with only information of the JVM, or write your own mbeans and deploy them as an Openfire plugin.


Configuration

Changing the Zapcat port number and bind address can be done from the configuration console in Openfire. There are two properties that you can use to change the way the Zapcat agent behaves: “zapcat.inetaddress” and “zapcat.port”. They do the same thing as Zapcat’s own, similarly named system properties.


If we want to change the port number that the Zapcat agent listens on, we can do so from the administration console. Click on the “Server” tab at the top of the administration console and select “System Properties” from the server manager settings.


On the bottom of this page, add a new property named “zapcat.port” and give it the value “10054”.


When you press “Save Property”, the new property is set in the XMPP server and the Zapcat agent automatically switches to listening on the new port. There is no need to reload the plugin.


Logging

The only issue that remains is the problem that Openfire uses a proprietary logging solution. It does not use log4j or any of the other standard logging facilities. Zapcat uses log4j to log.


The effect of this mismatch is that you cannot configure Zapcat’s log4j logging as you are used to. Instead all the logging goes to Openfire’s logs, which you can access from its administration console.

 
photo: Elvis Santanahttp://www.sxc.hu/profile/tome213
if you find this interesting, terrible or just would like to know more, e-mail memailto:kjkoster@kjkoster.org?subject=
web statistics
download zapcathttp://sourceforge.net/project/showfiles.php?group_id=209024
http://java-monitor.com/