WARNING: Version 5.x has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Cluster state
editCluster state
editGet state
editTo get the basic cluster state, call:
var state = _client.ClusterState();
This returns a IClusterStateResponse
that contains information about the master node, all nodes in the cluster and such.
Get specific part of state
editIf you only want a specific part, i.e. only information about nodes, you can do the following:
var state = _client.ClusterState(c => c .Metrics(ClusterStateMetric.Nodes) );