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 stateedit
Get stateedit
To 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 stateedit
If 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) );