Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Open a command prompt and navigate to the <JDK_HOME>/bin directory.
  2. Execute the jconsole command to open the log-in screen of the Java Monitoring & Management Console as shown below.
  3. Enter the connection details in the above screen as follows:
    1. Enter the JMX server URL in the Remote Process field. This URL is published on the command prompt when you start the WSO2 server as explained above.

      Info
      titleTip

      If you are connecting with a remote IP address instead of localhost, you need to bind the JMX service to the externally accessible IP address by adding the following system property to the product startup script stored in the <PRODUCT_HOME>/bin directory (wso2server.sh for Linux and wso2server.bat for Windows). For more information, read Troubleshooting Connection Problems in JConsole.

      Code Block
      -Djava.rmi.server.hostname=<IP_ADDRESS_WHICH_YOU_USE_TO_CONNECT_TO_SERVER>

      Be sure to restart the server after adding the above property.

    2. Enter values for the Username and Password fields to log in. If you are logging in as the administrator, you can use the same administrator account that is used to log in to the product's management console: admin/admin. 

      Info

      Make sure that the user ID you are using for JMX monitoring is assigned a role that has the Server Admin permission. See Configuring Roles for further information about configuring roles assigned to users. Any user assigned to the admin role can log in to JMX.

  4. Click Connect to open the Java Monitoring & Management Console. The following tabs will be available:

    Localtabgroup
    Localtab
    titleOverview

    See the Oracle documentation on using JConsole for more information on these tabs.

    Localtab
    titleMemory

    See the Oracle documentation on using JConsole for more information on these tabs.

    Localtab
    titleThreads

    See the Oracle documentation on using JConsole for more information on these tabs.

    Localtab
    titleClasses

    See the Oracle documentation on using JConsole for more information on these tabs.

    Localtab
    titleVM

    See the Oracle documentation on using JConsole for more information on these tabs.

    Localtab
    titleMBeans

    See the Oracle documentation on using JConsole for more information on these tabs.

    Anchor
    mbeans
    mbeans

Using the ServerAdmin MBean

...

Jolokia is a JMX-HTTP bridge, which is an alternative to JSR-160 connectors. It is an agent-based approach that supports many platforms. In addition to basic JMX operations, it enhances JMX monitoring with unique features like bulk requests and fine-grained security policies.

 Follow the steps below to use Jolokia to monitor a WSO2 product.

  1. Download Jolokia OSGi Agent. (These instructions are tested with the Jolokia OSGI Agent version 1.3.6 by downloading the jolokia-osgi-1.3.6.jar file.) 
  2. Add it to the <PRODUCT-HOME>/repository/components/dropins/ directory.

    Tip

    In WSO2 EI, add it to the <EI-HOME>/dropins/ directory.

  3. Start the WSO2 product server. 

Once the server starts, you can read MBeans using Jolokia APIs. Following are a few examples.

For more information on the JMX MBeans that are available in WSO2 products, see Monitoring a WSO2 product with JConsole.