com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Setting up the JMX Agent

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. 

Adding the default JMX profile

You can set up the default JMX toolbox which is shipped with WSO2 DAS to monitor system resources of a WSO2 server (CPU/memory/OS) running on Linux. Follow the steps below to setup this default JMX toolbox.

  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 Default JMX Toolbox to monitor system resources of a WSo2 server running on Linux (CPU/Memory/OS). This adds a pre-configured server profile to monitor the JMX attributes of WSO2 DAS itself as shown below.
    default profile to monitor WSO2 DAS by itself
  4. Click Enable in the Actions column, to enable the added server profile, and then click Edit.
  5. Change the pre-configured details of the server profile as required. 

    You can change the Server URL, to monitor any WSO2 server accordingly. Change all occurrences of the host and port (if you have set a port offset on the server) accordingly in the JMX server URL.

  6. Click Add More to monitor more attributes by the server profile if required in the below screen.

    edit the pre-configured server profile for WSO2 servers.

  7. Click an MBean on the list that loads to view its attributes list. 
  8. 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
  9. Click Save to save the changes.
  10.  Click No in the below pop-up message, to add the changes to the existing version of the server profile.
    pop up message to create a new version of the server profile
    Else, click Yes in the above pop-up message, to save the changes by incrementing the version of the server profile as shown below.
    incremented version  with the changes saved

Adding a JMX server profile

Follow the steps below to set up a JMX server profile in WSO2 DAS to monitor JMX attributes.

  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).

    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. 

    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

    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

Uploading the C-App

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://<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 Explorer
  4. Click Search. You view the published data as shown below.
    view results
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.