Skip to end of metadata
Go to start of metadata

Overview

JBoss AS 6.x and JBoss EAP/EWP/SOA-P 5.x servers are managed by the jboss-as-5 plugin. Server instances can always be auto-discovered, but in order to collect metrics and execute operations, they must have remote Profile Service access, and (for JVM metrics) remote JMX access, enabled.

Enabling Remote Access to JMX and Profile Service

In order for the RHQ Agent to access metrics and operations of a managed JBoss AS instance, remote JMX access must be enabled for that instance.

Setting up remote JMX access for a JBoss AS instance is fairly straightforward.

First, verify that the JNP (JBoss Naming Protocol) service is deployed; it is deployed by default.

In AS 5.x, the JNP service is configured via the following block in <JBOSS_HOME>/server/<CONFIG_NAME>/conf/jboss-service.xml:

In 6.x, the JNP service is configured via the following block in <JBOSS_HOME>/server/<CONFIG_NAME>/deploy/naming-jboss-beans.xml:

It is typically a good idea to enable authentication on the JMX connector.

To enable authentication in AS 5.x, uncomment the following line in <JBOSS_HOME>/server/<CONFIG_NAME>/deploy/jmx-invoker-service.xml:

To enable authentication in AS 6.x, uncomment the following line in <JBOSS_HOME>/server/<CONFIG_NAME>/deploy/jmx-jboss-mbeans.xml:

Note, in JBoss EAP and other application platform products, authentication is enabled by default.

If you enable authentication, make sure the admin user is enabled in <JBOSS_HOME>/server/<CONFIG_NAME>/conf/props/jmx-console-users.properties. The necessary line is:

This line is commented by default in JBoss EAP and other application platform products, but not in JBoss AS.

If you changed any configuration files, you will need to restart the JBoss AS instance for the changes to take effect.

Enabling Discovery and Management of JBoss AS JVM

To enable discovery and management of the JBoss AS JVM and its subsystems (memory management, threading, logging, etc.), you must configure JBoss AS to use the platform MBeanServer as the server it installs its MBeans into.

On UNIX, add the following lines to your run.conf:

On Windows, add the following lines to your run.bat:

set JAVA_OPTS=%JAVA_OPTS% -Djboss.platform.mbeanserver
set JAVA_OPTS=%JAVA_OPTS% -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl

Then restart JBoss AS.

Enabling HTTP Response-Time Metrics

Before enabling HTTP Response-Time metric collection in your JBoss AS Server WAR Resources, you will need to install the RHQ servlet filter JAR and configure the RHQ servlet filter in one or more web.xml files.

Install Filter Jar

The connector-rtfilter.zip file contains two jar files:

  1. the rhq-rtfilter JAR
  2. the commons-logging JAR

JBoss AS already includes commons-logging.jar, so only the rhq-rtfilter JAR file is needed; copy it to <JBOSS_HOME>/lib/server/<PROFILE>/lib/.

Configure Filter in web.xml File(s)

Typically, the filter is deployed across all applications, in which case you can configure the filter in the global web.xml (located in <JBOSS_HOME>/server/<CONFIG_NAME>/default/deploy/jbossweb.sar/ for AS 5.x-6.x, or <JBOSS_HOME>/server/<CONFIG_NAME>/default/deploy/jboss-web.deployer/conf/ for AS 3.x-4.x). However, if you only want to deploy the filter to certain web applications, instead configure it in <WAR>/WEB-INF/web.xml for each application.

Add the following lines to the web.xml file(s). Uncomment the filter and filter mapping to activate the filter. To only apply the filter to certain URL's, you can change the filter mapping's URL pattern and/or add additional filter mappings.

Restart JBoss AS

After installing the filter jar and configuring the filter in web.xml, restart the JBoss AS instance to pick up the changes and deploy the filter.

Enable Collection of HTTP Response Time Metrics in RHQ

Once AS is logging HTTP response times for one or more web applications, you will need to configure RHQ to collect those response times. Enabling response time collection in RHQ is done on a per web application basis as follows:

  1. Find the Web Application Context Resource or Embedded Web Application Context Resource corresponding to the web application. To do so, go to the (JBossAS5) JBoss AS Server Resource corresponding to the AS server that's collecting response times. In the Resource tree on the left, expand the Applications node that's a child of the JBoss AS Server Resource node. If the WAR for which you wish to enable response time collection is a standalone application, expand the Web Application (WAR)s node under the Applications node; or if the WAR is part of an EAR, expand the Embedded Web Application (WAR)s node under the Applications node. Find the WAR Resource corresponding to the WAR and expand it, then click on its child (Embedded) Web Application Context Resource node to select that Resource.
  2. Go to the (Embedded) Web Application Context Resource's Inventory > Connection Settings subtab. Under the Response Time section, make sure the Response Time Log File property is set to the correct location of the response time log file that the response time servlet filter is now producing (e.g. for a web application named foo.war deployed to the default virtual host, the path to the response time log file would be something like "/opt/jboss-6.1.0.Final/server/default/log/rt/foo_rt.log"). Optionally, you can also set the Response Time Url Excludes and/or Response Time Url Transforms properties.
  3. Go to the (Embedded) Web Application Context Resource's Monitoring > Schedules subtab and enable the "Response Time" metric. Set the collection interval of that metric to the value of choice.
  4. Wait a few minutes for the first batch of response time data to get collected and reported to the RHQ Server, then go to the (Embedded) Web Application Context Resource's Monitoring > Calltime subtab to view the response time data. If the data's not there, wait a bit longer, then refresh the page.
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.