WildFly ships with a powerful Command Line Interface which allows a full management control of the server. If you are using MBeans to capture relevant attributes of the server many options are still available. Besides the UI views which are available in jconsole or jvisualvm, you can use the plain command line to include it as part of some bash scripts.

Use hawtio REST API

The recommended option for monitoring WildFly MBeans is via hawtio REST API. In this tutorial you can learn more about installing hawtio on JBoss EAP /WildFly: Hawtio quickstart tutorial

Once installed hawtio you can by default you can connect on http;//localhost:8778/jolokia to access the jolokia REST API. For example, if you want to capture the server version, you could use:

$ curl http://localhost:8080/hawtio/jolokia/read/jboss.as:management-root=server/productVersion

There is no need to search for the correct MBean structure. By clicking on each attribute, you will be able to pickup the correct REST URL:

jboss monitoring

 Use twiddle

Yes, although disappeared since JBoss AS 7, there is also a project named twiddle available at https://github.com/swesource/twiddle-standalone which can be used to connect to WildFly and query Mbeans. Installing it is pretty simple, unpack the jar file, then set the JBOSS_HOME:

$ export JBOSS_HOME=/home/jboss/wildfly-10.1.0.Final/

In order to use it, you have to point to the correct protocol, which is jmx:remoting-jmx for JBoss AS 7 and EAP 6. On the other hand, if you are using WildFly, then you have to go through the jmx-http protocol. Here are some examples:

JBoss EAP 6 / AS 7

$ ./twiddle.sh -s service:jmx:remoting-jmx:// get jboss.as:management-root=server


$ ./twiddle.sh -s service:jmx:remote+http://localhost:9990 get jboss.as:management-root=server




Related articles available on mastertheboss.com

How to monitor JBoss CPU usage ?

  JBoss AS 7 users and WildFly can use JConsole in order to moni

How to monitor jboss graphically ?

  You’ve been using the JMX Console to access yourMBeans. In thi

How to monitor JBoss with snapshots?

  JBoss gives you the ability to capture data not only in real t

JBoss Alarm configuration

An Alarm indicates that an event (generally an error) has happene

Monitoring JBoss EJB Container

In this article we will show how easily you can write an Intercep

Monitor JBoss AS with Jolokia

Jolokia is a cool monitoring solution for accessing JMX MBeans re