Cluster APIs
The cluster APIs enables the retrieval of cluster and node level information, such as statistics about off-heap memory allocation.
Nodes statistics
The cluster nodes stats API allows to retrieve one or more (or all) of the cluster nodes statistics.
GET /_siren/nodes/stats GET /_siren/nodes/nodeId1,nodeId2/stats
The first command retrieves stats of all the nodes in the cluster. The second command selectively retrieves nodes stats of only nodeId1 and nodeId2.
By default, all stats are returned. You can limit this by combining any of the following stats:
memoryMemory allocation statistics.
plannerStatistics about the planner job and task pools.
Memory information
The memory flag can be set to retrieve information about the memory allocation:
GET /_siren/nodes/stats/memory
The response includes memory allocation statistics for each node as follows:
{
"se6baEC9T4K7-14yuG2qgA": {
"memory" : {
"allocated_direct_memory_in_bytes" : 0,
"allocated_root_memory_in_bytes": 0,
"root_allocator_dump": "Allocator(ROOT) 0/0/3750232064/17179869184 (res/actual/peak/limit)"
}
},
"sKnVUBo9ShGzkl4GYih7BA": {
"memory" : {
"allocated_direct_memory_in_bytes" : 0,
"allocated_root_memory_in_bytes": 0,
"root_allocator_dump": "Allocator(ROOT) 0/0/0/17179869184 (res/actual/peak/limit)"
}
}
}allocated_direct_memory_in_bytesThe actual direct memory allocated by Netty in bytes.
allocated_root_memory_in_bytesThe actual direct memory allocated by the root allocator in bytes.
allocator_dumpDump of the root allocator including the actual direct memory allocated, the peak and the limit.
Planner information
The planner flag can be set to retrieve information about the planner job and task pools:
GET /_siren/nodes/stats/planner
The response includes memory allocation statistics for each node as follows:
{
"se6baEC9T4K7-14yuG2qgA": {
"planner": {
"thread_pool": {
"job": {
"permits": 1,
"queue": 0,
"active": 0,
"largest": 1,
"completed": 538
},
"task": {
"permits": 3,
"queue": 0,
"active": 0,
"largest": 3,
"completed": 3955
}
}
}
},
"sKnVUBo9ShGzkl4GYih7BA": {
"planner": {
"thread_pool": {
"job": {
"permits": 1,
"queue": 0,
"active": 0,
"largest": 1,
"completed": 537
},
"task": {
"permits": 3,
"queue": 0,
"active": 0,
"largest": 3,
"completed": 3863
}
}
}
}
}Optimizer statistics cache
The cluster optimizer cache API allows to retrieve a snapshot of the query optimizer cache for a list of the cluster nodes.
GET /_siren/cache GET /_siren/nodeId1,nodeId2/cache GET /_siren/cache/clear GET /_siren/nodeId1,nodeId2/cache/clear
The first command retrieves the state of the optimizer cache for all the nodes in the cluster, while the second only for the desired list of node IDs. The third command invalidates the optimizer cache on every node, while the last command does so for only the selected nodes.
The response includes statistics about the cache use on each node:
{
"aQAf0tIwRtq_n4mBr9SLTw": {
"size": 92,
"hit_count": 32,
"miss_count": 92,
"eviction_count": 42,
"load_exception_count": 0,
"load_success_count": 92,
"total_load_time_in_millis": 68004
}
}sizeThe estimated number of entries in the cache.
hit_countThe number of cache hits.
miss_countThe number of cache misses.
eviction_countThe number of evicted entries.
load_exception_countThe number of times a request failed to execute as its response was to be put in the cache.
load_success_countThe number of times a request was executed successfully as its response was to be put in the cache.
total_load_time_in_millisThe time spent in milliseconds to load request responses into the cache.