Versions Compared

Key

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

Geode uses Java MBeans, specifically MXBeans, to expose management controls and monitoring features.

To provide cluster level management and monitoring, Geode uses a federated Open MBean strategy. The Java classes interact with a single MBeanServer that aggregates MBeans from other local and remote members. This strategy provides a consolidated, single-agent view of the distributed system.

The implementation is based on JMX  (industry-standard and friendly to generic JMX clients), this allows use of any JMX compliant tools (third party or custom build) to manage and monitor Geode cluster. For example, JConsole.

Create and Register a New Geode JMX MBean

...

When the FederationComponent is initially created, the ManagementCacheListener afterCreate method is invoked. This causes a proxy representation of the MBean to be registered in the MBeanServer using MBeanJMXAdapter registerMBeanProxy.

Some examples are:

  • GemFire:service=CacheService,name=LuceneService,type=Member,member=192.168.2.13(69570)<ec><v1>-1025

  • GemFire:type=Member,member=192.168.2.13(69570)<ec><v1>-1025

  • GemFire:service=LockService,name=gatewayEventIdIndexMetaData_lockService,type=Member,member=192.168.2.13(69570)<ec><v1>-1025

  • GemFire:service=DiskStore,name=DEFAULT,type=Member,member=192.168.2.13(69570)<ec><v1>-1025

  • GemFire:service=CacheServer,port=58176,type=Member,member=192.168.2.13(69570)<ec><v1>-1025

  • GemFire:service=AsyncEventQueue,queue=full_index#_data,type=Member,member=192.168.2.13(69570)<ec><v1>-1025

  • GemFire:service=Region,name=/data,type=Member,member=192.168.2.13(69570)<ec><v1>-1025

Aggregation

 Depending on the MBean, an AggregateHandler is invoked to aggregate the data.

 When the ManagementCacheListener afterUpdate method is invoked, it retrieves the proxy and updates the state of the MBean.

 More details to come.

...

 

What is registered for each ObjectName by the registerMBeanProxy method is a each MBean by the registerMBeanProxy method is a MBeanProxyInvocationHandler. This object handles requests from JMX clients. MBean state is retrieved When a request is received, it is handled in one of two ways, either by operation or by attribute.

All operations are forwarded to the appropriate member using the MBeanProxyInvocationHandler delegateToFunctionService method. This method executes the ManagementFunction in the member. The ManagementFunction uses the local MBeanServer to invoke the operation on the MBean represented by the ObjectName.

All requests for attributes are handled by the MBeanProxyInvocationHandler delegateToObjectState method. This method gets the FederationComponent from the local monitoring region and retrieves the value of the requested attribute. All requests for operations are handled by the MBeanProxyInvocationHandler delegateToFunctionService method. This method executes the ManagementFunction to forward the operation to the appropriate member. The ManagementFunction executes in the member and uses the MBeanServer to invoke the operation on the MBean.

Aggregation

 Depending on the MBean, an AggregateHandler is invoked to aggregate the data in the JMX manager.

 When the ManagementCacheListener afterUpdate method is invoked, it retrieves the proxy and updates the state of the MBean.

 More details to come.

 All attributes are retrieved in the JMX manager using the MBeanProxyInvocationHandler delegateToObjectState method. This method gets the FederationComponent from the local monitoring region and retrieves value of the requested attribute.