REST - /v1/nodes
caution
This section of the documentation is deprecated and will be removed in the future.
For client examples, see this section.
Please refer to the OpenAPI documentation for the most up-to-date information.
For client examples, see this section.
Usage
The nodes endpoint accepts a GET
request and returns information about relevant nodes in the cluster. The query can be for the entire cluster, or for a particular collection.
GET /v1/nodes
Or
GET /v1/nodes/{CollectionName}
Parameters
Name | Location | Type | Description |
---|---|---|---|
output | body | string | How much information to include in the output. Options: minimal (default) and verbose (includes shard information). |
Returned data:
The nodes
endpoint returns an array of nodes. The nodes have the following fields:
name
: Name of the node.status
: Status of the node (one of:HEALTHY
,UNHEALTHY
,UNAVAILABLE
,INDEXING
).version
: Version of Weaviate running on the node.gitHash
: Short git hash of the latest commit of Weaviate running on the node.stats
: Statistics for the node.shardCount
: Total number of shards on the node.objectCount
Total number of indexed objects on the node.
shards
: Array of shard statistics. To seeshards
details, setoutput == verbose
.name
: Name of the shard.class
: Name of the collection stored on the shard.objectCount
: Number of indexed objects on the shard.vectorQueueLength
: Number of objects waiting to be indexed on the shard. (Available starting in Weaviate1.22
whenASYNC_INDEXING
is enabled.)
Example
The following command will retrieve summary information about all nodes in the cluster:
- Python (v4)
- Python (v3)
- JavaScript/TypeScript
- Go
- Java
- Curl
import weaviate
client = weaviate.connect_to_local()
nodes_info = client.cluster.nodes(
collection="JeopardyQuestion", # If omitted, all collections will be returned
output="verbose" # If omitted, will be "minimal"
)
print(nodes_info)
finally:
client.close()
import weaviate
client = weaviate.Client("http://localhost:8080")
nodes_status = client.cluster.get_nodes_status()
print(nodes_status)
import weaviate from 'weaviate-ts-client';
const client = weaviate.client({
scheme: 'http',
host: 'localhost:8080',
});
const response = await client.cluster
.nodesStatusGetter()
.do();
console.log(response);
package main
import (
"context"
"fmt"
"github.com/weaviate/weaviate-go-client/v4/weaviate"
)
func main() {
cfg := weaviate.Config{
Host: "localhost:8080",
Scheme: "http",
}
client, err := weaviate.NewClient(cfg)
if err != nil {
panic(err)
}
nodesStatus, err := client.Cluster().
NodesStatusGetter().
Do(context.Background())
if err != nil {
panic(err)
}
fmt.Printf("%v", nodesStatus)
}
package io.weaviate;
import io.weaviate.client.Config;
import io.weaviate.client.WeaviateClient;
import io.weaviate.client.base.Result;
import io.weaviate.client.v1.cluster.model.NodesStatusResponse;
public class App {
public static void main(String[] args) {
Config config = new Config("http", "localhost:8080");
WeaviateClient client = new WeaviateClient(config);
Result<NodesStatusResponse> result = client.cluster()
.nodesStatusGetter()
.run();
if (result.hasErrors()) {
System.out.println(result.getError());
return;
}
System.out.println(result.getResult());
}
}
curl http://localhost:8080/v1/nodes
Example output:
{
"nodes": [
{
"batchStats": {
"ratePerSecond": 0
},
"gitHash": "e6b37ce",
"name": "weaviate-0",
"stats": {
"objectCount": 0,
"shardCount": 2
},
"status": "HEALTHY",
"version": "1.22.1"
},
{
"batchStats": {
"ratePerSecond": 0
},
"gitHash": "e6b37ce",
"name": "weaviate-1",
"stats": {
"objectCount": 1,
"shardCount": 2
},
"status": "HEALTHY",
"version": "1.22.1"
},
{
"batchStats": {
"ratePerSecond": 0
},
"gitHash": "e6b37ce",
"name": "weaviate-2",
"stats": {
"objectCount": 1,
"shardCount": 2
},
"status": "HEALTHY",
"version": "1.22.1"
}
]
}
Questions and feedback
If you have any questions or feedback, let us know in our user forum.