JMX Monitoring

Table of Contents

What is JMX

"Java Management Extensions ( JMX ) is a Java technology that supplies tools for managing and monitoring applications , system objects, devices (such as printers ) and service-oriented networks. Those resources are represented by objects called MBeans (for Managed Bean )." from Wikipedia page Java Management Extensions.

JMX can be used for in-depth Java monitoring (memory usage, garbage collection, number of instantiated objects, etc.). In Graphlytic, the JMX can be also used to stop running ETL Jobs.

Remote JMX connection to Graphlytic

JMX connection is by default enabled in Graphlytic (Graphlytic 3.1.0+).

Configuration

By default, JMX is running as a remote process at localhost:1099 without authentication.

To change the host or port please locale the "localhost" or "1099" values in the configuration files and change them to desired values. Please note that every value is in the file in 2 places and both needs to be changed.

The configured files are:

  • jetty-http.xml

  • jetty-http-https.xml

  • jetty-https.xml

The configuration is the same in every file and looks like this:

<!-- JMX CONFIGURATION START -->
<Call class="java.lang.System" name="setProperty">
<Arg>java.rmi.server.hostname</Arg>
<Arg>127.0.0.1</Arg>
</Call>
<Call name="addBean">
<Arg>
<New id="ConnectorServer" class="org.eclipse.jetty.jmx.ConnectorServer">
<Arg>
<New class="javax.management.remote.JMXServiceURL">
<Arg type="java.lang.String">rmi</Arg>
<Arg type="java.lang.String"><Property name="jetty.jmxremote.rmihost" deprecated="jetty.jmxrmihost" default="localhost"/></Arg>
<Arg type="java.lang.Integer"><Property name="jetty.jmxremote.rmiport" deprecated="jetty.jmxrmiport" default="1099"/></Arg>
<Arg type="java.lang.String">/jndi/rmi://<Property name="jetty.jmxremote.rmihost" deprecated="jetty.jmxrmihost" default= "localhost"/>:<Property name="jetty.jmxremote.rmiport" deprecated="jetty.jmxrmiport" default="1099"/>/jmxrmi</Arg>
</New>
</Arg>
<Arg>org.eclipse.jetty.jmx:name=rmiconnectorserver</Arg>
</New>
</Arg>
</Call>
<!-- JMX CONFIGURATION END -->

Using JConsole to stop ETL jobs

JConsole is a Java application packaged with every Java JDK, located in <JDK_HOME>/lib/jconsole.jar

After starting of the JConsole please enter a Remote Process connection "localhost:1099" without any Username or Password and hit "Connect".

images/download/attachments/28844816/jconsole.png

This will start a JMX connection that will show a lot of usefull informations about the running Graphlytic instance.

images/download/attachments/44508780/image2020-9-14_15-57-6.png

To stop a running ETL Job please follow these steps:

  1. go to the "MBeans" tab

  2. locate the "scriptella/etl" folder

  3. locate the script that you want to stop (only running scripts are shown)

  4. open the "Operations" menu of that script

  5. click on the "cancel" operation

images/download/attachments/44508780/image2020-9-14_16-13-13.png

After succesfull stopping operation invocation a confirmation message is shown:

images/download/thumbnails/44508780/image2020-9-14_16-15-39.png

The script will be stopped as soon as possible (not immediatelly but after competion of the currently running subtask).