Monitoring and collecting data from JBoss

Red Hat® JBoss® Middleware is a family of a lightweight, cloud-friendly, enterprise-grade products that help enterprises innovate faster, in a smarter way.

More information on:

How it works

This plugin analyzes the performance of your JBoss web server.

It captures traffic rates, latencies and response codes of requests sent to the web server by parsing the JBoss access log file. The plugin can get global statistics (the number of connections, the number of workers, etc.) using the JMX interface of the JBoss web server.

The minimal supported version of JBoss is 7.1.


The plugin needs to be installed together with a CoScale agent, instructions on how to install the CoScale agent can be found here. If you want to monitor JBoss inside Docker containers using CoScale, check out the instructions here.


Configure your JBoss JMX connection

To enable collecting general statistics for JBoss, you have to enable JMX. You can do this in two ways, by:

In your <jboss-install-dir> update the following lines in /standalone/configuration/standalone.xml


<subsystem xmlns="urn:jboss:domain:jmx:1.1">
    <show-model value="true"/>


<subsystem xmlns="urn:jboss:domain:jmx:1.1">
    <show-model value="true"/>
    <remoting-connector use-management-endpoint="true"/>

Before you can run the JBoss Application Server, you need to ensure that you’ve configured the JBOSS_HOME environment variable.

2) Updating your JBoss configuration

Add the following to your JBoss configuration (eg. <jboss-install-dir>/bin/standalone.conf). Don’t forget to replace the <jboss-install-dir> placeholder by your installation path.

    -Djava.util.logging.manager=org.jboss.logmanager.LogManager \
    -Xbootclasspath/p:<jboss-install-dir>/modules/org/jboss/logmanager/main/jboss-logmanager-1.2.2.GA.jar \
    -Xbootclasspath/p:<jboss-install-dir>/modules/org/jboss/logmanager/log4j/main/jboss-logmanager-log4j-1.0.0.GA.jar \
    -Xbootclasspath/p:<jboss-install-dir>/modules/org/apache/log4j/main/log4j-1.2.16.jar -Djboss.modules.system.pkgs=org.jboss.logmanager"

Configure JBoss access logs

To measure performance of all http requests, enable the JBoss access log by adding the next lines in the <virtual-server> tag in your configuration file:

<access-log pattern="%v %B %D &quot;%r&quot; %A %a %t %H %p %U %s %S %T" rotate="true">
    <directory path="." relative-to="jboss.server.log.dir"/>


<virtual-server name="default-host" enable-welcome-root="true">
    <alias name="localhost"/>
    <alias name=""/>
    <access-log pattern="%v %B %D &quot;%r&quot; %A %a %t %H %p %U %s %S %T" rotate="true">
        <directory path="." relative-to="jboss.server.log.dir"/>

Restart JBoss to apply these changes.

A log format must contain the request: %r Example of a log format configuration so that we can have all the information that we need: %v \"%r\" %D %T %s %B

Value Original Value Remarks
Hostname %v -  
Request "%r" -  
Latency %D %D represented in milliseconds
Latency %T %T represented in seconds
Status Code %s -  
Bytes Sent %B -  

Another log format that will work:

"%v %B %D \"%r\" %A %a %t %H %p %U %s %S %T %{xxx}i %{xxx}o"

Where xxx is a servlet of your choice.

To enable access logging in JBoss version 5 and version 6, uncomment these lines in server.xml:

<Valve className="org.apache.catalina.valves.AccessLogValve"
   prefix="localhost_access_log." suffix=".log"
   pattern="common" directory="${jboss.server.log.dir}"
   resolveHosts="false" />

Active checks

This plugin can be configured to perform a HTTP GET on your JBoss. This active monitoring allows us to calculate the uptime of the service and the response time of the provided URL.

A full URL (eg. http://localhost/test_page) should be provided.



Name Unit Dimensions
Daemon JBoss thread count threads  
Free JBoss physical memory size b  
Free JBoss swap space size b  
JBoss active check latency s  
JBoss active check uptime %  
JBoss buffer pool used memory b Pool
JBoss CPU Time s  
JBoss heap memory size b Attribute
JBoss non heap memory size b Attribute
JBoss uptime s  
Peak JBoss thread count threads  
Total JBoss physical memory size b  
Total JBoss swap space size b  
Total started JBoss thread count threads  

JBoss / Classes

Name Unit Dimensions
JBoss loaded class count    
JBoss total loaded class count    
JBoss unloaded class count    

JBoss / Datasources

Name Unit Dimensions
JBoss active count # Datasource
JBoss available count # Datasource
JBoss average blocking time s Datasource
JBoss average creation time s Datasource
JBoss created count # Datasource
JBoss destroyed count # Datasource
JBoss max creation time s Datasource
JBoss max used count # Datasource
JBoss max wait time s Datasource
JBoss timedOut # Datasource
JBoss total blocking time s Datasource
JBoss total creation time s Datasource

JBoss / GC

Name Unit Dimensions
JBoss GC collection count # Collector
JBoss GC collection time s Collector

JBoss / Thread

Name Unit Dimensions
JBoss current thread cpu time %  
JBoss current thread user time %  
JBoss daemon thread count threads  
JBoss peak thread count threads  
JBoss thread count threads  
JBoss total started thread count threads  

JBoss / Transactions

Name Unit Dimensions
JBoss number of aborted transactions transact  
JBoss number of application rollbacks transact  
JBoss number of committed transactions transact  
JBoss number of heuristics transact  
JBoss number of inflight transactions transact  
JBoss number of nested transactions transact  
JBoss number of resource rollbacks transact  
JBoss number of timed out transactions transact  
JBoss number of transactions transact  
JBoss process id socket max ports #  
JBoss transactions default timeout s  
JBoss transactions jts transact  

JBoss / Web

Name Unit Dimensions
JBoss bytes received b/s Web
JBoss bytes sent b/s Web
JBoss enable lookups # Web
JBoss enabled # Web
JBoss error count errors Web
JBoss max time s Web
JBoss max-post-size b Web
JBoss max-save-post-size b Web
JBoss processing time s Web
JBoss request count req Web


Name Description Attributes
JBOSS service state watcher State watcher status