JBoss / WildFly — Prerequisites
Prerequisites for monitoring JBoss / WildFly with HEAL.
Prerequisites to complete before adding this component in the HEAL Control Center.
Standalone Mode#
To use JBoss in standalone mode, you will need to provide the following attributes:
jboss_bin: The path to the JBoss binary directory.jboss_ip: The IP address that JBoss should bind to.jboss_native_port: The port that JBoss should use for remote management.jboss_management_user: The username for the JBoss management user.jboss_management_password: The password for the JBoss management user.
Once you have installed JBoss, a management user and password will be created as part of the installation process. You can use these credentials for the jboss_management_user and jboss_management_password attributes.
You can then use Control Center to provide these attributes to the Component Agent, which will use them to execute the JBoss scripts.

Domain Mode#
The prerequisites for monitoring JBoss Application Server in domain mode include:
- To run some commands in CLI, create a management/monitor user with read-only permissions in the JBoss console and make sure the user running the HEAL agent is part of the JBOSS group.The commands are:
/core-service=platform-mbean/type=memory/:read-attribute(name=non-heap-memory-usage)/core-service=platform-mbean/type=memory/:read-attribute(name=heap-memory-usage)/core-service=platform-mbean/type=threading:read-resource(include-runtime=true)/subsystem=datasources:read-resource/subsystem=datasources:read-resource(recursive=true, include-runtime=true)
-
Add the JMX port by modifying the JBoss startup script configuration (
standalone.conffor Linux,standalone.conf.batfor Windows) by adding the following lines:For Linux:JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=<jmx port number>" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=true" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false" JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver" JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=<target-ipaddress>" JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager" JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/p:../modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-1.5.4.Final-redhat-1.jar"For Windows:
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=<jmx port number>" set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.authenticate=true" set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote" set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.ssl=false" set "JAVA_OPTS=%JAVA_OPTS% -Djboss.platform.mbeanserver" set "JAVA_OPTS=%JAVA_OPTS% -Djava.rmi.server.hostname=<target-ipaddress>" set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager" set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.logmanager -Xbootclasspath/p:../modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-1.5.4.Final-redhat-1.jar" -
Restart JBoss after making these modifications.
- Enable access log on the APP tier with minimal fields like date, time, response time, and status code.
Note: If your application architecture does not include a dedicated web component, you will need to enable access logging directly on the application tier. To do this, modify the JBoss standalone.xml configuration file for your application server.
Note: Ensure that all nodes of the application have the same access log file format to make it easier to collect and analyze the logs.
See also: JBoss / WildFly (what HEAL monitors)