Wildfly enable JMX

Wildfly JMX monitoring 


Wildfly is the new version of JBOSS and and for jboss 8 its code name was changed to wildfly and now any new release coming for Jboss after version 8 is coming with wildfly name

To  monitor performance via JMX console : like Jconsole/Visual VM we first need to create manangement user for wildfly.

Unlike conventional JMX configuration which uses rmi protocal Wildfly uses its own protocal http-remoting-jmx
While rmi protocal gives all the access to jndi wildfly gives the option to what should be access via JMX which makes JMX more secure.

How to create Wildfly management user 


To create user on Linux/Unix use the add-user.sh and on Windows use add-user-bat script file.

Its located under $JBOSS_HOME/bin where JBOSS_HOME is location where JBOSS/Wildfly is installed.

Whether you use bat / sh below steps would be same.






Once user is created find the client jar located under $JBOSS_HOME/bin/client/ and add to Jconsole path.
Wildfy also provide jconsole.sh / jconsole.bat located under $JBOSS_HOME/bin/

Executed it and it will open jconsole (look for classpath it's generated)
To check which classpath it generates enable the echo message at the end of jconsole script.

JMX url would be like below

service:jmx:http-remoting-jmx://<Hostname>:<JMX port>

By default JMX-port is 9990 (Unless it was not changed in standalone.xml or using offset)

In our example we run it on same machine and did not modify the port so our url is as below.

service:jmx:http-remoting-jmx://localhost:9990
On jconsole provide these details





Once logged in it will show details as below




Now here all monitoring details can be found like whatever mbeans are exposed are present on Mbeans secontion or VM summary.

No comments: