The Clustered REST API is exposed from Management Center to allow you to monitor clustered statistics of distributed objects.
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
The entry point for Clustered REST API is /rest/
.
This resource does not have any attributes.
This resource returns a list of clusters that are connected to the Management Center.
/rest/clusters
Request:
curl http://localhost:8083/mancenter/rest/clusters
200
(application/json)Body:
["dev","qa"]
This resource returns information related to the provided cluster name.
/rest/clusters/{clustername}
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/
200
(application/json)Body:
{"masterAddress":"192.168.2.78:5701"}
This resource returns a list of members belonging to the provided clusters.
/rest/clusters/{clustername}/members
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members
200
(application/json)Body:
["192.168.2.78:5701","192.168.2.78:5702","192.168.2.78:5703","192.168.2.78:5704"]
This resource returns information related to the provided member.
/rest/clusters/{clustername}/members/{member}
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701
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
}
/rest/clusters/{clustername}/members/{member}/connectionManager
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701/connectionManager
200
(application/json)Body:
{
"clientConnectionCount":2,
"activeConnectionCount":5,
"connectionCount":5
}
/rest/clusters/{clustername}/members/{member}/operationService
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701/operationService
200
(application/json)Body:
{
"responseQueueSize":0,
"operationExecutorQueueSize":0,
"runningOperationsCount":0,
"remoteOperationCount":1,
"executedOperationCount":461139,
"operationThreadCount":8
}
/rest/clusters/{clustername}/members/{member}/eventService
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701/eventService
200
(application/json)Body:
{
"eventThreadCount":5,
"eventQueueCapacity":1000000,
"eventQueueSize":0
}
/rest/clusters/{clustername}/members/{member}/partitionService
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701/partitionService
200
(application/json)Body:
{
"partitionCount":271,
"activePartitionCount":68
}
/rest/clusters/{clustername}/members/{member}/proxyService
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701/proxyService
200
(application/json)Body:
{
"proxyCount":8
}
/rest/clusters/{clustername}/members/{member}/managedExecutors
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/members/192.168.2.78:5701/managedExecutors
200
(application/json)Body:
["hz:system","hz:scheduled","hz:client","hz:query","hz:io","hz:async"]
/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
200
(application/json)Body:
{
"name":"hz:system",
"queueSize":0,
"poolSize":0,
"remainingQueueCapacity":2147483647,
"maximumPoolSize":4,
"completedTaskCount":12,
"terminated":false
}
This resource returns a list of clients belonging to the provided cluster.
/rest/clusters/{clustername}/clients
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/clients
200
(application/json)Body:
["192.168.2.78:61708"]
/rest/clusters/{clustername}/clients/{client}
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/clients/192.168.2.78:61708
200
(application/json)Body:
{
"uuid":"6fae7af6-7a7c-4fa5-b165-cde24cf070f5",
"address":"192.168.2.78:61708",
"clientType":"JAVA"
}
This resource returns a list of maps belonging to the provided cluster.
/rest/clusters/{clustername}/maps
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/maps
200
(application/json)Body:
["customers","orders"]
/rest/clusters/{clustername}/maps/{mapName}
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/maps/customers
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
}
This resource returns a list of multimaps belonging to the provided cluster.
/rest/clusters/{clustername}/multimaps
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/multimaps
200
(application/json)Body:
["customerAddresses"]
/rest/clusters/{clustername}/multimaps/{multimapname}
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/multimaps/customerAddresses
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
}
This resource returns a list of queues belonging to the provided cluster.
/rest/clusters/{clustername}/queues
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/queues
200
(application/json)Body:
["messages"]
/rest/clusters/{clustername}/queues/{queueName}
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/queues/messages
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
}
This resource returns a list of topics belonging to the provided cluster.
/rest/clusters/{clustername}/topics
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/topics
200
(application/json)Body:
["news"]
/rest/clusters/{clustername}/topics/{topicName}
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/topics/news
200
(application/json)Body:
{
"cluster":"dev",
"name":"news",
"numberOfPublishes":56370,
"totalReceivedMessages":56370,
"creationTime":1403602693411
}
This resource returns a list of executors belonging to the provided cluster.
/rest/clusters/{clustername}/executors
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/executors
200
(application/json)Body:
["order-executor"]
/rest/clusters/{clustername}/executors/{executorName}
Request:
curl http://localhost:8083/mancenter/rest/clusters/dev/executors/order-executor
200
(application/json)Body:
{
"cluster":"dev",
"name":"order-executor",
"creationTime":1403602694196,
"pendingTaskCount":0,
"startedTaskCount":1241,
"completedTaskCount":1241,
"cancelledTaskCount":0
}