Hazelcast IMDG Enterprise
The Clustered REST API is exposed from Management Center to allow you to monitor clustered statistics of distributed objects.
Enabling Clustered REST
To enable Clustered REST on your Management Center, pass the following system property at startup. This property is disabled by default.
-Dhazelcast.mc.rest.enabled=true
Clustered REST API Root
The entry point for Clustered REST API is /rest/
.
This resource does not have any attributes.
Clusters Resource
This resource returns a list of clusters that are connected to the Management Center.
Retrieve Clusters
-
Request Type: GET
-
URL:
/rest/clusters
-
Request:
curl http://localhost:8083/mancenter/rest/clusters
-
Response:
200
(application/json) -
Body:
["dev","qa"]
Cluster Resource
This resource returns information related to the provided cluster name.
Retrieve Cluster Information
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/
-
Response:
200
(application/json) -
Body:
{"masterAddress":"192.168.2.78:5701"}
Members Resource
This resource returns a list of members belonging to the provided clusters.
Retrieve Members [GET] [/rest/clusters/{clustername}/members]
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/members
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members
-
Response:
200
(application/json) -
Body:
["192.168.2.78:5701","192.168.2.78:5702","192.168.2.78:5703","192.168.2.78:5704"]
Member Resource
This resource returns information related to the provided member.
Retrieve Member Information
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/members/{member}
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701
-
Response:
200
(application/json) -
Body:
{ "cluster":"dev", "name":"192.168.2.78:5701", "maxMemory":129957888, "ownedPartitionCount":68, "usedMemory":60688784, "freeMemory":24311408, "totalMemory":85000192, "connectedClientCount":1, "master":true }
Retrieve Connection Manager Information
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/members/{member}/connectionManager
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701/connectionManager
-
Response:
200
(application/json) -
Body:
{ "clientConnectionCount":2, "activeConnectionCount":5, "connectionCount":5 }
Retrieve Operation Service Information
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/members/{member}/operationService
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701/operationService
-
Response:
200
(application/json) -
Body:
{ "responseQueueSize":0, "operationExecutorQueueSize":0, "runningOperationsCount":0, "remoteOperationCount":1, "executedOperationCount":461139, "operationThreadCount":8 }
Retrieve Event Service Information
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/members/{member}/eventService
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701/eventService
-
Response:
200
(application/json) -
Body:
{ "eventThreadCount":5, "eventQueueCapacity":1000000, "eventQueueSize":0 }
Retrieve Partition Service Information
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/members/{member}/partitionService
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701/partitionService
-
Response:
200
(application/json) -
Body:
{ "partitionCount":271, "activePartitionCount":68 }
Retrieve Proxy Service Information
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/members/{member}/proxyService
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701/proxyService
-
Response:
200
(application/json) -
Body:
{ "proxyCount":8 }
Retrieve All Managed Executors
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/members/{member}/managedExecutors
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701/managedExecutors
-
Response:
200
(application/json) -
Body:
["hz:system","hz:scheduled","hz:client","hz:query","hz:io","hz:async"]
Retrieve a Managed Executor
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/members/{member}/managedExecutors/{managedExecutor}
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701 /managedExecutors/hz:system
-
Response:
200
(application/json) -
Body:
{ "name":"hz:system", "queueSize":0, "poolSize":0, "remainingQueueCapacity":2147483647, "maximumPoolSize":4, "completedTaskCount":12, "terminated":false }
Client Endpoints Resource
This resource returns a list of client endpoints belonging to the provided cluster. Please consider using the newly added Client Statistics Resource as it contains more detailed information about clients.
Retrieve List of Client Endpoints
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/clients
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/clients
-
Response:
200
(application/json) -
Body:
["192.168.2.78:61708"]
Retrieve Client Endpoint Information
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/clients/{client}
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/clients/192.168.2.78:61708
-
Response:
200
(application/json) -
Body:
{ "uuid":"6fae7af6-7a7c-4fa5-b165-cde24cf070f5", "address":"192.168.2.78:61708", "clientType":"JAVA" }
Maps Resource
This resource returns a list of maps belonging to the provided cluster.
Retrieve List of Maps
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/maps
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/maps
-
Response:
200
(application/json) -
Body:
["customers","orders"]
Retrieve Map Information
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/maps/{mapName}
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/maps/customers
-
Response:
200
(application/json) -
Body:
{ "cluster":"dev", "name":"customers", "ownedEntryCount":1000, "backupEntryCount":1000, "ownedEntryMemoryCost":157890, "backupEntryMemoryCost":113683, "heapCost":297005, "lockedEntryCount":0, "dirtyEntryCount":0, "hits":3001, "lastAccessTime":1403608925777, "lastUpdateTime":1403608925777, "creationTime":1403602693388, "putOperationCount":110630, "getOperationCount":165945, "removeOperationCount":55315, "otherOperationCount":0, "events":0, "maxPutLatency":52, "maxGetLatency":30, "maxRemoveLatency":21 }
MultiMaps Resource
This resource returns a list of multimaps belonging to the provided cluster.
Retrieve List of MultiMaps
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/multimaps
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/multimaps
-
Response:
200
(application/json) -
Body:
["customerAddresses"]
Retrieve MultiMap Information
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/multimaps/{multimapname}
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/multimaps/customerAddresses
-
Response:
200
(application/json) -
Body:
{ "cluster":"dev", "name":"customerAddresses", "ownedEntryCount":996, "backupEntryCount":996, "ownedEntryMemoryCost":0, "backupEntryMemoryCost":0, "heapCost":0, "lockedEntryCount":0, "dirtyEntryCount":0, "hits":0, "lastAccessTime":1403603095521, "lastUpdateTime":1403603095521, "creationTime":1403602694158, "putOperationCount":166041, "getOperationCount":110694, "removeOperationCount":55347, "otherOperationCount":0, "events":0, "maxPutLatency":77, "maxGetLatency":69, "maxRemoveLatency":42 }
Queues Resource
This resource returns a list of queues belonging to the provided cluster.
Retrieve List of Queues
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/queues
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/queues
-
Response:
200
(application/json) -
Body:
["messages"]
Retrieve Queue Information
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/queues/{queueName}
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/queues/messages
-
Response:
200
(application/json) -
Body:
{ "cluster":"dev", "name":"messages", "ownedItemCount":55408, "backupItemCount":55408, "minAge":0, "maxAge":0, "aveAge":0, "numberOfOffers":55408, "numberOfRejectedOffers":0, "numberOfPolls":0, "numberOfEmptyPolls":0, "numberOfOtherOperations":0, "numberOfEvents":0, "creationTime":1403602694196 }
Topics Resource
This resource returns a list of topics belonging to the provided cluster.
Retrieve List of Topics
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/topics
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/topics
-
Response:
200
(application/json) -
Body:
["news"]
Retrieve Topic Information
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/topics/{topicName}
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/topics/news
-
Response:
200
(application/json) -
Body:
{ "cluster":"dev", "name":"news", "numberOfPublishes":56370, "totalReceivedMessages":56370, "creationTime":1403602693411 }
Executors Resource
This resource returns a list of executors belonging to the provided cluster.
Retrieve List of Executors
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/executors
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/executors
-
Response:
200
(application/json) -
Body:
["order-executor"]
Retrieve Executor Information [GET] [/rest/clusters/{clustername}/executors/{executorName}]
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/executors/{executorName}
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/executors/order-executor
-
Response:
200
(application/json) -
Body:
{ "cluster":"dev", "name":"order-executor", "creationTime":1403602694196, "pendingTaskCount":0, "startedTaskCount":1241, "completedTaskCount":1241, "cancelledTaskCount":0 }
Client Statistics Resource
This resource returns a list of clients belonging to the provided cluster.
Retrieve List of Client UUIDs
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/clientStats
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/clientStats
-
Response:
200
(application/json) -
Body:
[ "f3b1e0e9-ea67-41b2-aba5-ea7480f02a93", "cebf4dc9-852c-4605-a181-ffe1cca371a4", "2371eed5-26e0-4470-92c1-41ea17110ef6", "139990b3-fbc0-43a8-9c12-be53913333f7", "d0364a1e-8665-46a8-af1d-be1af5580d07", "7f337f8a-3538-4b5c-8ffc-9d4ae459e956", "6ef9b6e5-5add-40d9-9319-ce502f55b5fc", "fead3a99-19de-431c-9dd0-d6ecc4a4b9c8", "e788e04e-2ded-4992-9d76-52c1973216e5", "654fc9fb-c5c1-48a0-9b69-0c129fce860f" ]
Retrieve Detailed Client Statistics [GET] [/rest/clusters/{clustername}/clientStats/{clientUuid}]
-
Request Type: GET
-
URL:
/rest/clusters/{clustername}/clientStats/{clientUuid}
-
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/clientStats/2371eed5-26e0-4470-92c1-41ea17110ef6
-
Response:
200
(application/json) -
Body:
{ "type": "JAVA", "name": "hz.client_7", "address": "127.0.0.1:42733", "clusterConnectionTimestamp": 1507874427419, "enterprise": true, "lastStatisticsCollectionTime": 1507881309434, "osStats": { "committedVirtualMemorySize": 12976173056, "freePhysicalMemorySize": 3615662080, "freeSwapSpaceSize": 8447324160, "maxFileDescriptorCount": 1000000, "openFileDescriptorCount": 191, "processCpuTime": 252980000000, "systemLoadAverage": 83.0, "totalPhysicalMemorySize": 16756101120, "totalSwapSpaceSize": 8447324160 }, "runtimeStats": { "availableProcessors": 12, "freeMemory": 135665432, "maxMemory": 3724541952, "totalMemory": 361234432, "uptime": 6894992, "usedMemory": 225569000 }, "nearCacheStats": { "CACHE": { "a-cache": { "creationTime": 1507874429719, "evictions": 0, "hits": 0, "misses": 50, "ownedEntryCount": 0, "expirations": 0, "ownedEntryMemoryCost": 0, "lastPersistenceDuration": 0, "lastPersistenceKeyCount": 0, "lastPersistenceTime": 0, "lastPersistenceWrittenBytes": 0, "lastPersistenceFailure": "" }, "b.cache": { "creationTime": 1507874429973, "evictions": 0, "hits": 0, "misses": 50, "ownedEntryCount": 0, "expirations": 0, "ownedEntryMemoryCost": 0, "lastPersistenceDuration": 0, "lastPersistenceKeyCount": 0, "lastPersistenceTime": 0, "lastPersistenceWrittenBytes": 0, "lastPersistenceFailure": "" } }, "MAP": { "other,map": { "creationTime": 1507874428638, "evictions": 0, "hits": 100, "misses": 50, "ownedEntryCount": 0, "expirations": 0, "ownedEntryMemoryCost": 0, "lastPersistenceDuration": 0, "lastPersistenceKeyCount": 0, "lastPersistenceTime": 0, "lastPersistenceWrittenBytes": 0, "lastPersistenceFailure": "" }, "employee-map": { "creationTime": 1507874427959, "evictions": 0, "hits": 100, "misses": 50, "ownedEntryCount": 0, "expirations": 0, "ownedEntryMemoryCost": 0, "lastPersistenceDuration": 0, "lastPersistenceKeyCount": 0, "lastPersistenceTime": 0, "lastPersistenceWrittenBytes": 0, "lastPersistenceFailure": "" } } }, "userExecutorQueueSize": 0, "memberConnection": "ALL", "version": "UNKNOWN" }