Versions Compared

Key

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

The JMX agent of WSO2 DAS monitors JMX attributes of a required JMX-enabled server (e.g. Carbon-based servers), and stores monitored data in WSO2 DAS. It uses the Thrift API of WSO2 DAS to send monitored data to DAS server. You can create a JMX monitoring profile to monitor a set of attributes from a single JMX server. 

...

  1. Log in to the management console using admin/admin credentials and the following URL:  https://<DAS_HOST>:<DAS_PORT>/carbon/
  2. Click Configure, and then click JMX Agent.
  3. Click  Add JMX Server Profile, to add a new monitoring profile.
  4. Enter the required details as shown below. 
    creating a new JMX server profileThe details you enter in the above screen are described below.

    FieldDescriptionExample
    NameUnique name of the server profile.testProfile
    ScheduleCROn expression defining how often the attributes should be monitored.once every 2 seconds (0/2**?**)
    Server URLThe JMX server URL.

    service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi (Use this example to monitor DAS by itself).

    Note

    Change all occurrences of the host and port (if you have set a port offset on the server) accordingly in the JMX server URL.

    User NameThe username of the JMX server.admin
    PasswordThe password of the JMX server.admin
  5.  Click Load MBeans. You see the loaded MBeans of the JMX server as shown below.
    the loaded MBeans of the JMX server
  6. Click an MBean on the list that loads to view its  attributes list. 
  7. Select the attributes that you require to monitor by this profile as shown below. You can set an alias to easily identify the data in  the Data Access Layer of WSO2 DAS.
    select attributes to monitor by this server profile
  8.  Click Save . You view the new server profile added to the list of existing profiles as shown below.  

    Info

    You can enable/disable monitoring of JMX attributes, and also edit or delete the monitoring profiles using the options provided in this screen.

    list of JMX server profiles

    Info

    After you edit the server profile, click  No  in the below pop-up message, to add the changes to the existing version of the server profile, or click  Yes  to save the changes by incrementing the version of the server profile as shown below.

    pop up message to create a new version of the server profile
    incremented version of the server profile with the saved changes

...

WSO2 DAS is shipped with a sample C-App for the JMX Agent. This includes all the artifacts which you need to publish data to the JMX agent which you enabled above, and to persist that data. Follow the steps below to upload this sample Carbon Application (c-App) file to the DAS. For more information, see  Carbon Application Deployment for DAS .

  1. Log in to the DAS management console using the following URL: https https://<DAS_HOST>:<DAS_PORT>/carbon/
  2. Click Main, and then click Add in the Carbon Applications menu.
  3. Click  Choose File, and upload the <DAS_HOME>/samples/capps/JMX_Agent.car file as shown below.
    upload the C-App
  4. Click  Main , then click Carbon Applications, and then click List view, to see the uploaded Carbon application as shown below.  
    list of all available C-Apps

Viewing the output

You may use the Data Explorer of the WSO2 DAS Management Console to browse published events.

Using the Data Explorer 

Follow the steps below to use the Data Explorer to view the output.  

  1. Log in to the DAS management console if you are not already logged in.
  2. Click Main, and then click Data Explorer in the Interactive Analytics menu.
  3. Select JMX_AGENT_TOOLBLX for the Table Name as shown below.
    select the created table from the Data ExplorerImage Modified
  4. Click Search. You view the published data as shown below.
    view results