kv_get_node_metrics()
#include <kvstore.h>
kv_node_metrics_t *
kv_get_node_metrics(kv_stats_t *stats,
kv_int_t index)
Returns a list of metrics associated with each node in the store. The information is returned using a kv_node_metrics_t
structure, which includes the following data members:
-
kv_int_t avg_latency_ms
Returns the trailing average latency (in ms) over all requests made to this node.
-
kv_int_t max_active_request_count
Returns the number of requests that were concurrently active for this node at this Oracle NoSQL Database client.
-
kv_long_t request_count
Returns the total number of requests processed by the node.
-
kv_int_t is_active
Returns
1
if the node is currently active. That is, it is reachable and can service requests. -
kv_int_t is_master
Returns
1
if the node is currently a master. -
const char *node_name
Returns the internal name associated with the node.
-
const char *zone_name;
Returns the name of the zone which hosts the node.
Note that if the index parameter is out of range, then this functions returns
NULL
.
Parameters
-
stats
The stats parameter is the statistics structure containing the node metrics information. This structure is allocated using kv_get_stats(), and is released using kv_release_stats().
-
index
The index parameter is the integer designation of the node for which you want to retrieve statistical information. You can discover the total number of nodes for which statistical information is available using kv_get_num_nodes().
See Also