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

Use JConsole to Monitor and Manage Governance Registry

Now it is possible to use JMX Console to monitor and manage Governance Registry since it can now be represented as a MBean object. Currently users are able to perform a selective set of operations (services) over Governance Registry and can monitor corresponding results. The set of registry services that can be managed are defined in the registry.xml. The topics discussed below explain how to setup JConsole and manage Governance Registry. 

Setup JConsole with Governance Registry 

  1. Enable JMX for Governance Registry as given in the page Configuration for JMX Support .

     

  2. The same configuration defines the services which are exposed through JMX.

    <jmx enabled="true">
        <service name="InvocationStatistics" enabled="true"/>
        <service name="Activities" enabled="true"/>
        <service name="Properties" enabled="true"/>
        <service name="Subscriptions" enabled="true"/>
        <service name="Events" enabled="true"/>
    </jmx>
  3. Start the server by running sh wso2serever.sh from $GREG_HOME/bin.
     
  4. On a different console run the command jconsole to start the JMX Console. 

     

  5. After running this command a startup screen would be prompted which illustrates a list of currently running processes in the machine. Select the correct Carbon process by the process ID and click the connect button at bottom. 



  6. After connecting to the Carbon process a new console would get prompted which is the Management and Monitoring console of the selected Carbon process.
     
  7. Select the MBeans tab of the Management console, and you would be able to see the MBean object of the org.wso2.carbon/Registry on the right hand side panel.



  8. In the panel under Registry the related services are listed and the corresponding attributes and the operations are also illustrated. 

Managing Activities using JConsole 

  1. Activites>Attributes>List will prompt all the activites happened on a registry by any user. 



  2. Activites>Operations>getActivitesForUser will give all the activities performed by a given user. The user name should be given as the P1 parameter, and then click the button with the operation name to invoke the operation.



    and results would be illustrated as given below. 

  3. Activites>Operations>getActivitesForPath will give all the activities that has been performed on a given path. The resource path should be given as the P1 parameter, and then click the button with the operation name to invoke the operation.



    when the parameter was set as /_system/config/repository/transports following were the results illustrated. 

Managing Events using JConsole

  1. Events>Attributes>List will prompt all the JMX related events happened on registry by any user. A JMX related event can occur when a resource is subscribed to JMX type events. 

  2. Events>Operations>clearAll will clear all the JMX related events received and will clear the list under Events>Attributes>List. 

Managing Invocation Statistics using JConsole 

  1. InvocationStatistics>Attributes>InvokeMethods will list the invoked methods of statistics enabled admin services by any user. 

  2. InvocationStatistics>Operations>getInvocationCounts will give the number of occassions an admin service method has been invoked. The P1 parameter should be the name of the invoked method of the service in the same format as given in the above list. 


Managing Properties using JConsole 

  1. Properties>Operations>setProperty can be used to add properties to a given resource. In this method invocation parameters would be as below,
    1. P1 - resource path
    2. P2 - property name
    3. P3 - property value


    If the method invoked successfully then a "Method successfully invoked" message will be prompted, and then the user can check the added property on the resource from UI.



  2. Properties>Operations>getProperty can be used to retrieve a property. In this method invocation parameters would be as below,
    1. P1 - resource path
    2. P2 - property name



    this method returns the value of the given property, and once the method is invoked the result will be displayed as below.

  3. Properties>Operations>getProperties can be used to retrieve all the properties of a given resource. In this method invocation parameters would be as below,
    1. P1 - resource path


    this method invocation would result all the properties (as key, value pairs) on the given resource as below.

  4. Properties>Operations>removeProperty can be used to remove a given property from a given resource. For this method invocation parameters would be as below,
    1. P1 - resource path
    2. P2 - property name


    If the method invoked successfully then a "Method successfully invoked" message will be prompted as given below.

Managing Subscriptions using JConsole

  1. Subscriptions>Attributes>List would list all the subscriptions added in the registry by any user.

  2. Subscriptions>Attributes>EventNames would list all the available Event type names. Event types define possible events that can occur by different resource operations.

  3. Subscriptions>Operations>subscribe operation is used to add any type of subscription to any defined resource. For this method invocation parameters would be as below,
    1. P1 - Subscription endpoint (E.g. - For email the endpoint should be given as  mailto:<<email address>>,For  JMX subscriptions endpoint should be  jmx://  and valid endpoints for SOAP and REST subscriptions ).

    2. P2 - Is the subscription endpoint a REST endpoint (true/false)
    3. P3 - The path of the resource where the subscription is going to get added to. 
    4. P4- Event type (E.g. - ResourceUpdated, ChildCreated and etc.)

    To get an idea about Event types, please refer this page .


    the invocation of this method would return the ID of the added subscription as given below.

     

  4. Subscriptions>Operations>unsubscribe operation is used to remove an already existing subscription in the registry. For this method invocation parameters would be as below,
    1. P1 - ID of the subscription to be removed



    If the method invoked successfully then a "Method successfully invoked" message will be prompted as given below.




 

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