Extended Monitoring Guide

  • Docs Home
  • Community Home

3. Enable Monitoring

3.1. Configuring JBoss to Allow JMX Queries

JBoss uses the JAVA_OPTS approach for enabling remote access to beans. However, it requires some additional properties. To set up your JAVA_OPTS for use in JBoss see the following code segment:

JAVA_OPTS="-Dcom.sun.management.jmxremote.port=12345"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="${JAVA_OPTS} -Djboss.platform.mbeanserver"
JAVA_OPTS="${JAVA_OPTS} -Djavax.management.builder.initial=org.jboss.system\
.server.jmx.MBeanServerBuilderImpl"
export JAVA_OPTS

When you start JBoss via the run.sh you must also pass the "-b 0.0.0.0" argument:

cd ${JBOSS_HOME}/bin
./run.sh -b 0.0.0.0

JMX actually uses two separate ports for MBean access: one is used for initial connection handling and authentication, and the other is used for RMI access. During the handshake between a JMX Client and the JMX Agent the agent tells the client the IP address and port number for the RMI registry. By default JBoss sets the IP address to 127.0.0.1. This works when the JMX client and the JMX agent reside on the same device, but it won't work in a distributed environment.

By passing the "-b 0.0.0.0" argument you instruct JBoss to bind to all available network ports, and this results in the JMX Agent's handshaking logic using a network reachable address when informing clients of the RMI registry hostname and port.

3.2. Configuring Zenoss

All JBoss services must have a device entry under the /Devices/Server/JBoss device class.

Note

The zenjmx daemon must be configured and running. See Section 2.1, “Sun Java Runtime Environment (JRE)” for more information about configuring the zenjmx daemon with the Sun JRE tools.

  1. Navigate to the device or device class under the /Devices/Server/JBoss device class in the Zenoss web interface.

  2. If applying changes to a device, click the page menu, then select MorezProperties.

    If applying changes to a device class, click on the zProperties tab.

  3. Edit the appropriate zProperties for the device or devices.

    Table 28.2. JBoss zProperties

    NameDescription

    zJBossJmxManagementAuthenticate

    This zProperty is deprecated.

    zJBossJmxManagementPassword

    JMX password

    zJBossJmxManagementPort

    The port number used to gather JMX information

    zJBossJmxManagementUsername

    JMX username for authentication


  4. Click Save to save your changes.

    You will now be able to start collecting the JBoss server metrics from this device.

  5. Navigate to the Perf tab and you should see some placeholders for graphs. After approximately 15 minutes you should see the graphs start to become populated with information.

Tip

The out-of-the-box JBoss data source configuration has been defined at the macro level, but can be configured to operate on a more granular basis. For example, the Servlet Reload Count applies to all servlets in all web applications but it could be narrowed to be Servlet /submitOrder in web application "production server".