Versions Compared

Key

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

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. 

Table of Contents

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.

    Code Block
    languagehtml/xml
    <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. 

...

  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.

...