Manage Nodes in a Cluster
Add a Node
See Adding a Node for information on adding nodes.
Show Information about a Node in a Cluster
You can fetch/re-post the object representing the node in the cluster
using GET
/PUT
requests. $NODE_ID
is the integer ID of the new node.
Description | Shows a node in the cluster | ||
Method | GET /api/v1/clusterconfig/members/ | ||
Response Data | node | ||
Authentication Required | yes | ||
Path Arguments | Description | Data type | Required? |
id | ID of the bucket storage configuration | string | required |
Return Codes | |||
200 | Request complete | ||
400 | Bad authentication | ||
500 | Request failed |
To redirect the output to a JSON file, run the script like this:
$ script>$YOUR_FILE_NAME.json
You can then use this as the payload in further requests when updating the information.
GET /api/v1/clusterconfig/members/$NODE_ID
curl -v -X GET $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
[
{
"vhost": 1,
"uuid": "7q2LwHv6q3C5jmdGj3EYL1n56olAYcQy",
"internalHostUri": "$YOUR_LOGSCALE_URL",
"displayName": "host-1"
}
]
The returned JSON has the following structure:
Table:
Field | Type | Description |
---|---|---|
displayName | string | User configurable name for this host |
internalHostUri | uri | Internal URI for this node |
uuid | string | Universally unique ID for this node; not user configurable |
vhost | integer | Node ID; not user configurable |
Modify information about a node in a cluster
Description | Update the configuration of a node in the cluster. | ||
Method | PUT /api/v1/clusterconfig/members/ | ||
Request Data | node | ||
Response Data | node | ||
Authentication Required | yes | ||
Path Arguments | Description | Data type | Required? |
id | ID of the bucket storage configuration | string | required |
Return Codes | |||
200 | Request complete | ||
400 | Bad authentication | ||
500 | Request failed |
PUT /api/v1/clusterconfig/members/$NODE_ID
curl -v -X PUT $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
[
{
"vhost": 1,
"uuid": "7q2LwHv6q3C5jmdGj3EYL1n56olAYcQy",
"internalHostUri": "$YOUR_LOGSCALE_URL",
"displayName": "host-1"
}
]
The returned JSON has the following structure:
Table:
Field | Type | Description |
---|---|---|
displayName | string | User configurable name for this host |
internalHostUri | uri | Internal URI for this node |
uuid | string | Universally unique ID for this node; not user configurable |
vhost | integer | Node ID; not user configurable |
You can edit the fields
internalHostUri
and displayName
in
this structure and POST
the resulting changes
back to the server, preserving the vhost and uuid fields.
Delete a Node from a Cluster
See Removing a Node documentation on removing a node from a cluster.
Description | Delete the configuration of a node in the cluster. | ||
Method | DELETE /api/v1/clusterconfig/members/ | ||
Authentication Required | yes | ||
Path Arguments | Description | Data type | Required? |
id | ID of the bucket storage configuration | string | required |
Query Arguments | Description | Data type | Required? |
accept-data-loss | Force deletion of the node configuration | boolean | optional |
Supported Values | |||
false | Deletes only if no data or partitions are assigned | ||
true | Force deletion even if it has data and assigned partitions | ||
Return Codes | |||
200 | Request complete | ||
400 | Bad authentication | ||
500 | Request failed |
If the host does not have any segment files, and no assigned partitions, there is no data loss when deleting a node.
DELETE /api/v1/clusterconfig/members/$NODE_ID
curl -v -X DELETE $YOUR_LOGSCALE_URL/api/v1/clusterconfig/members/$NODE_ID \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
It is possible to drop a host, even if it has data and assigned
partitions, by adding the query parameter
accept-data-loss
with the value
true
.
Warning
This procedure silently drops your data.