# Monitoring Plugin Readme

## Overview

The monitoring plugin adds support for chat archiving and server statistics to Openfire. It provides support for generating various reports on the server statistics, as well as managing, viewing, and reporting on chat logs.

## Installation

Copy monitoring.jar into the plugins directory of your Openfire installation. The plugin will then be automatically deployed. To upgrade to a new version, copy the new monitoring.jar file over the existing file.

Make sure that the enterprise plugin is removed before installing this plugin. Otherwise the enterprise plugin will rename the monitoring.jar to monitoring.jar.old thus removing thus plugin. If this happens just stop the server, remove the enterprise.jar plugin and rename monitoring.jar.old to monitoring.jar and start the server again.

## Upgrading from Enterprise

If you are upgrading from the Enterprise plugin, and wish to keep your old statistics and logs, you will need to manually run some database scripts to perform the migration. Note, if you don't care about your previous statistics and chat logs, you don't have to worry about these steps.

First, you will need to shut down your Openfire server and remove the enterprise plugin. To do this, perform the following steps:

1. Shut down your Openfire server
2. Remove the enterprise.jar file and the enterprise directory from the plugins directory in your Openfire install root
3. Install this plugin, monitoring.jar by copying it into the plugins directory.
4. At this point, you will need to start up Openfire and let it extract and install the monitoring plugin. You can watch for this to occur by looking under the Plugins tab in the Openfire admin console. Once it appears in the list, continue to the next step.
5. Shut the server back down again.
6. Go into your plugins/monitoring/database directory. There you will see some scripts prefixed with import_. Log into your database, switch to the Openfire's database as you configured during setup (you can find this information in conf/openfire.xml if you don't remember it), and run the script that matches the database you are using. Note that the embedded database is hsqldb and you can use the script in bin/extra from the Openfire install root (bin/extra/embedded-db-viewer.sh or bin/extra/embedded-db-viewer.bat, depending on whether you are using Windows) to access your embedded database.
7. Once the script has completed, you can start Openfire back up and all of your settings should be the way they were when you were running the Enterprise plugin.

## Configuration

Chat archiving is enabled by default. However, only information about who is communicating and at what time is stored unless chat transcript archiving is enabled. To enable chat transcript archiving or group chat archiving, you will need to log into the admin console and go to:
Server --> Archiving --> Archiving Settings