Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 16. Retrieving Health Statistics
Monitor the health of your Data Grid clusters in the following ways:
-
Programmatically with
embeddedCacheManager.getHealth()
method calls. - JMX MBeans
- Data Grid REST Server
16.1. Accessing the Health API via JMX Copier lienLien copié sur presse-papiers!
Retrieve Data Grid cluster health statistics via JMX.
Procedure
Connect to Data Grid server using any JMX capable tool such as JConsole and navigate to the following object:
org.infinispan:type=CacheManager,name="default",component=CacheContainerHealth
org.infinispan:type=CacheManager,name="default",component=CacheContainerHealth
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Select available MBeans to retrieve cluster health statistics.
16.2. Accessing the Health API via REST Copier lienLien copié sur presse-papiers!
Get Data Grid cluster health via the REST API.
Procedure
Invoke a
GET
request to retrieve cluster health.GET /rest/v2/cache-managers/{cacheManagerName}/health
GET /rest/v2/cache-managers/{cacheManagerName}/health
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Data Grid responds with a JSON
document such as the following:
Get cache manager status as follows:
GET /rest/v2/cache-managers/{cacheManagerName}/health/status
GET /rest/v2/cache-managers/{cacheManagerName}/health/status
Reference
See the REST v2 (version 2) API documentation for more information.