Archived community.zenoss.org | full text search
Skip navigation
Currently Being Moderated

6.2 Monitor a Tomcat (or Other Java/JMX) Server

VERSION 3  Click to view document history
Created on: Sep 14, 2010 8:04 AM by Zenoss API - Last Modified:  Sep 14, 2010 8:08 AM by Zenoss API

 2. Monitor a Tomcat (or Other Java/JMX) Server

Use the instructions in this section to prepare for and set up monitoring of a Tomcat or other Java/JMX server.

 2.1. Device Preparation for the Tomcat Server

When you start your Tomcat server, you must enable JMX access with these commands:

JAVA_OPTS="-Dcom.sun.management.jmxremote.port=12346"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false"  \
 export JAVA_OPTS

Note

If you prefer to use a WebLogic or JBoss server, see the configuration notes located at:

http://dev.zenoss.org/trac/browser/trunk/zenpacks/ZenPacks.zenoss.ZenJMX/notes.txt

Look at the list of loaded Zen Packs to verify that the ZenJMX ZenPack is installed. Select Advanced > Settings from the menu bar, and then select ZenPacks in the left panel.

 

Figure 6.1. Loaded ZenPacks

Loaded ZenPacks

 2.2. Monitoring the Tomcat Server

Use these instructions to set up Zenoss to monitor a Tomcat server.

  1. Add the Java server device to your preferred device class.

    Tip

    You might, for example, set up a Java Servers class under the Server device class and add the device in that location.

  2. When adding the device, de-select the Model option (In this case, the SNMP model will not add significant additional information.)

  3. Navigate to the newly added Java server device.

  4. In the left panel, select Device under Monitoring Templates.

  5. From the Action menu, select Bind Templates.

    The Bind Templates dialog appears.

  6. Select the ZenJMX template (loaded with the ZenJMX ZenPack) from the Available list and move it to the Selected list, and then click Save.

    The ZenJMX monitoring template is added to the list of monitoring templates.

 2.2.1. Change Data Source Parameters

In the next set of steps, you will change some of the parameters of the data sources. These data sources are provided through Java, and must be fine-tuned for Zenoss. These sample steps illustrate changing the Heap memory Data Source.

  1. Select the ZenJMX monitoring template in the left panel.

  2. In the Data Sources area, double-click ZenJMX Heap Memory.

    The Edit Data Source dialog appears.

  3. Ensure that the Enabled option is selected.

  4. In the JMX Connection and Metadata Information area, make sure that the value of the Management Port field is set to the same value as the management port on your Java server.

  5. In the JMX Remote Authentication Information area, make sure that:

    1. If you have remote authentication enabled on your server, you have also enabled it in Zenoss.

    2. Zenoss and server values match.

  6. Click Save.

To see where the JMX information appears in the device model, navigate to the device through the device list, and then click Graphs in the left panel.

These performance graphs should appear on the page:

  • ZenJMX Non-Heap Memory

  • ZenJMX Heap Memory

  • ZenJMX Open File Descriptors

  • ZenJMX Thread Count

The graphs are created by ZenJMX. When they are initially loaded, they will not display actual data.

 2.2.2. Collecting and Displaying Data

You must restart the ZenJMX daemon to being collecting and displaying data. To restart the daemon:

  1. From the menu bar, select Advanced.

  2. In the left panel, select Daemons.

  3. Next to the zenjmx entry, click Restart.

Comments (1)