Example JMX configuration

This topic describes how to configure VisualVM as a JMX reporter for Activator Monitoring Framework.

Configure Monitoring Framework

To configure Activator Monitoring Framework to send statistics to a JMX reporter:

  1. Go to <Activator_install_directory>\Activator\conf\ and open the file monitoringconfig.xml in a text editor.
  2. Edit the following lines in the file:
  3. <Reporter name="JMX" enabled="true" rateUnit="SECONDS" durationUnit="MILLISECONDS"></Reporter>
  4. Save the file.

Configure Activator to allow remote access to the JMX statistics

  1. Go to <Activator_install_directory>\Activator\conf\.
  2. Open jvmArguments.xml in a text editor.
  3. Add a jmxremote port definition for all JVMS you want to monitor:
  4. <NodeTypes>

      <NodeType type="TE" class="com.axway.clusterold.startup.Boot">

        <Property key="com.sun.management.jmxremote"/>

        <Property key="com.sun.management.jmxremote.port">9000</Property>

      ...

      </NodeType>

      ...

      <NodeType type="TE" class="com.axway.clusterold.startup.Boot">

        <Property key="com.sun.management.jmxremote"/>

        <Property key="com.sun.management.jmxremote.port">9001</Property>

      ...

      </NodeType>

  5. Go to <Activator_install_directory>/jre/lib/management.
  6. Open management.properties in a text editor.
  7. Set the following two entries:
  8. com.sun.management.jmxremote.local.only=false

    com.sun.management.jmxremote.authenticate=false

  9. Restart Activator.

After these changes, you can use a remote agent to analyze the JMX statistics produced by the application. This is the simplest setup, without authentication or connection security.

Configure VisualVM for Activator monitoring

Prerequisite

  • Download and install VisualVM:
  • http://visualvm.java.net/
  • Install the MBeans Tab Plug-In:
  • https://visualvm.java.net/mbeans_tab.html

Procedure

  1. Open a session in the VisualVM user interface.
  2. Add the server you want to monitor:
  3. In the directory tree, right-click Remote and from the context menu select Add Remote Host.
  4. In the Add Remote Host screen, enter the Host Name of the Activator Server and click OK.
  5. VisualVM adds the server name to the list of remote hosts.
  6. In the directory tree, right-click the name of the Activator Server, and from the context menu select Add JMX Connection.
  7. In the Add JMX Connection screen enter the Activator server hostname and jmx_access_port number. Use the port number you entered in the jvmArguments.xml file above.
  8. VisualVM adds the connection as a child of the remote server in the directory tree.

Monitor Activator with VisualVM

View generic information

VisualVM can display the following generic Activator information:

  • CPU / Garbage Collection
  • Memory
  • Threads

To monitor Activator in VisualVM:

  1. Open a session in VisualVM.
  2. From the directory tree, click Remote / <Activator server host name> / <JMX connection name> to view connection details.
  3. Select the Monitor tab.

Example screen:

View MBean data

To view data generated through MBeans, select the MBeans tab to display the MBeans Browser screen. From this screen you can monitor many MBeans, including:

axway-interchange

This MBean contains a large set of indicators related to database connection pool information, purging, of JVM memory, threads, alerts, sequencing, and more.

Example screen:

Secure the agent/server connection

Optionally, you can require authentication for the connection between the Activator server and the monitoring client. This sections provides instructions for setting up simple user/password based authentication.

  1. Go to <Activator_install_directory>/jre/lib/management.
  2. Make a copy of jmxremote.password.template and rename it jmxremote.password.
  3. Modify the permissions on the file so that it is only accessible by the owner (user who runs Activator). Note the name of the user and password.
  4. From the same directory, open mangement.properties in a text editor.
  5. Set the following attribute to true:
  6. com.sun.management.jmxremote.authenticate=true

  7. Restart Activator.
  8. In the VisualVM user interface, remove the old connection and define a new one, this time:
  9. Select the Use security credentials option.
  10. Select the Do not require SSL connection option.
  11. To add additional users and passwords, add them in jmxremote.password.

Related Links