Warning
This serves as a workaround because connecting to a JBoss application is not officially supported by the JMX plugin.Versions used
- Netprobe: GA5.14.2 Linux Netprobe
- Java/JRE: java-1.8.0-openjdk-1.8.0.232.b09-0.el8_0.x86_64
- JBoss EAP:
- JBoss Wildfly product version: 25.0.0.Final
- JBoss Wildfly release version: 17.0.1.Final
Steps
- Enable JBoss' management and admin console.
- Extract JBoss' jboss-cli-client.jar file.
- Transfer the jboss-cli-client.jar file to the Netprobe host.
- Add the path of the said file to the Netprobe's GENEOS_JARS variable. For example:
-
# 64-bit JMX Server settings
#JAVA_VENDOR=oracle
export JAVA_HOME=/etc/alternatives/jre_openjdk
export JRUN=${JAVA_HOME}/lib/amd64/server
export GENEOS_JARS=${NP_HOME}:/opt/geneos/jboss_client_jar
export GENEOS_LIBS=${NP_LIB} - In the example above, /opt/geneos/jboss_client_jar is the path of the jboss-cli-client.jar
-
- Restart the Netprobe.
- Check if the jboss-cli-client.jar file is loaded by looking at the "-Djava.class.path=" log entry in the Netprobe log. For example:
-
2022-02-09 18:24:58.851+0800 INFO: JVMManager Option 0 passed to JVM: '-Djava.class.path=.:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/geneos-plugins.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/hk2-locator-2.5.0.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jackson-annotations-2.11.0.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jersey-server-2.28.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/hk2-api-2.5.0.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jersey-common-2.28.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jakarta.json.bind-api-1.0.1.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jackson-jq-0.0.9.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/javax.annotation-api-1.3.2.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jakarta.inject-2.5.0.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jackson-databind-2.11.0.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jcodings-1.0.42.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/validation-api-2.0.1.Final.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jersey-entity-filtering-2.28.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/grizzly-http-all-2.4.4.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jersey-media-json-jackson-2.28.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/bcpkix-jdk15on-1.62.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jaxb-api-2.4.0-b180830.0359.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/bcprov-jdk15on-1.62.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/javax.activation-1.2.0.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jersey-hk2-2.28.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jersey-container-grizzly2-http-2.28.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jersey-client-2.28.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jakarta.ws.rs-api-2.1.5.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/hk2-utils-2.5.0.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/joni-2.1.25.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jt400-10.3.jar:../../../../../opt/geneos/binaries/netprobe/6370/netprobe/jars/jackson-core-2.11.0.jar:/opt/geneos/jboss_client_jar/jboss-cli-client.jar'
-
- Configure the JMX sampler
- The serviceURL setting format is service:jmx:remote+http://<JBoss hostname>:<JBoss admin console port> e.g. service:jmx:remote+http://pulgoso:9990
- Add the correct MBean object and attributes. You may use this sampler_jmx_jboss.xml for reference.
Extracting MBean objects and attributes
JConsole is needed to extract JBoss MBean objects and attributes
- Transfer the jboss-cli-client.jar file to a host that has JConsole.
- Open a command prompt (e.g. cmd).
- Go to the JConsole's directory.
- Execute the command
-
jconsole -J-Djava.class.path="<JAVA_HOME>\lib\tools.jar";"<JAVA_HOME>\lib\jconsole.jar";"<JBoss client path>\jboss-cli-client.jar"
- e.g.
-
jconsole -J-Djava.class.path="C:\Program Files\Java\jdk1.8.0_231\lib\tools.jar";"C:\Program Files\Java\jdk1.8.0_231\lib\jconsole.jar";"C:\Program Files\Java\jboss_client_jar\jboss-cli-client.jar"
-
- Input the following connection details in JConsole:
- host: service:jmx:remote+http://<JBoss hostname>:<JBoss admin console port> e.g. service:jmx:remote+http://pulgoso:9990
- username: JBoss admin console username
- password: JBoss admin console password
Comments
0 comments
Please sign in to leave a comment.