By default, nodes do not have any roles assigned to them. The only exception is the Central Management node, which you specifically promoted to fulfill that role. To assign a role to a node in the cluster, complete the following steps.
For details, see Open a transaction.
PUT the role you want to assign to the node and the node's IP address as a JSON object to the https://<IP-address-of-Central-Management-node>/api/cluster/nodes/<node-id-of-node-to-be-updated> endpoint.
You can assign the following roles to a node:
|
NOTE:
The central-management role can only be assigned using the /api/cluster/promote endpoint. |
|
NOTE:
Ensure that each node has a search role and only one search role. |
Role | Description |
---|---|
managed-host |
There can be several nodes with this role. Nodes with the Managed Host role synchronize their entire configuration from the Central Management node, not only those elements of the configuration that are related to the cluster. |
search-master |
There can be only one node with this role. The Search Master node is the one node in the cluster on which you can search all the session data recorded by other nodes in the cluster, provided that the other nodes have been assigned the Search Minion role. |
search-minion |
There can be several nodes with this role. Nodes with the Search Minion role send session data that they recorded to the Search Master for central search purposes. The session data recorded by a Search Minion node is not searchable on the node itself, only on the Search Master. |
search-local |
There can be several nodes with this role. Nodes with the Search Local role keep the session data that they recorded for local searching. The session data recorded by a Search Local node is searchable on the node itself, but not on the Search Master. This is the only backward-compatible search role. |
For further details on roles, see "Cluster roles" in the Administration Guide.
The body of the PUT request should be the following:
{ "roles": ["<role-to-assign>"], "address": "<IP-address-of-node-to-be-updated>" }
For example:
curl -H "Content-Type: application/json" --cookie cookies -X PUT https://<IP-address-of-Central-Management-node>/api/cluster/nodes/46f97a58-4028-467d-9a22-9cfe78ae3e1c --data '{"roles": ["managed-host"], "address": "<IP-address-of-node-to-be-updated>"}'
For details, see Commit a transaction.
To list the nodes available in a cluster, complete the following steps.
curl --cookie cookies https://<IP-address-of-Central-Management-node>/api/cluster/nodes
The following is a sample response received.
For details of the meta object, see Message format.
{ "items": [ { "key": "46f97a58-4028-467d-9a22-9cfe78ae3e1c", "meta": { "href": "/api/cluster/nodes/46f97a58-4028-467d-9a22-9cfe78ae3e1c", "status": "/api/cluster/status/46f97a58-4028-467d-9a22-9cfe78ae3e1c" } }, { "key": "b35c54da-b556-4f91-ade5-d26283d68277", "meta": { "href": "/api/cluster/nodes/b35c54da-b556-4f91-ade5-d26283d68277", "status": "/api/cluster/status/b35c54da-b556-4f91-ade5-d26283d68277" } } ], "meta": { "href": "/api/cluster/nodes", "parent": "/api/cluster", "remaining_seconds": 28800, "self": "/api/cluster/nodes/b35c54da-b556-4f91-ade5-d26283d68277", "status": "/api/cluster/status" } }
Elements | Type | Description | ||
---|---|---|---|---|
items | Top-level element (list of JSON objects) | List of endpoints (objects) available from the current endpoint. | ||
key | string | The ID of the node. | ||
meta | Top-level item (JSON object) | Contains links to different parts of the REST service. | ||
href | string (relative path) | The path of the node that returned the response. | ||
status | string (relative path) | The path to the status of the node that returned the response. |
To query one particular node, complete the following steps.
curl --cookie cookies https://<IP-address-of-node-to-be-queried>/api/cluster/nodes/<node-id-of-node-to-be-queried>
The following is a sample response received.
For details of the meta object, see Message format.
{ "body": { "address": "<IP-address-of-node-to-be-queried>", "roles": [ "central-management" ] }, "key": "b35c54da-b556-4f91-ade5-d26283d68277", "meta": { "href": "/api/cluster/nodes/b35c54da-b556-4f91-ade5-d26283d68277", "parent": "/api/cluster/nodes", "remaining_seconds": 28800, "status": "/api/cluster/status/b35c54da-b556-4f91-ade5-d26283d68277" } }
Elements | Type | Description | |
---|---|---|---|
body | Top-level element (JSON object) | Contains the JSON object of the node. | |
address | string | The IP address of the node. | |
roles | string | The role assigned to the node. | |
key | string | The ID of the node. |
To query the status of all nodes in your cluster, complete the following steps.
curl --cookie cookies https://<IP-address-of-Central-Management-node>/api/cluster/status
The following is a sample response received.
For details of the meta object, see Message format.
{ "items": [ { "key": "b35c54da-b556-4f91-ade5-d26283d68277", "fqdn": "sps.example.com", "health_status": null, "meta": { "configuration": "/api/cluster/nodes/b35c54da-b556-4f91-ade5-d26283d68277", "href": "/api/cluster/status/b35c54da-b556-4f91-ade5-d26283d68277" } }, { "key": "46f97a58-4028-467d-9a22-9cfe78ae3e1c", "last_seen": "2018-02-08T10:00:30Z", "fqdn": "managed-host.cluster", "health_status": { "memory": 62.5, "disk": 1.9, "swap": 0, "load1": 0.53, "load5": 0.68, "load15": 0.37, "sessions": { "ssh": 3, "rdp": 4 }, "total_sessions": 7 }, "configuration_sync": { "last_updated": "2018-02-08T09:59:00Z", "last_checked": "2018-02-08T09:59:00Z", "downloaded_xml_hash": "2853830f4aa0a90a63e75bab1b22e513", "issues": { "warnings": [ { "message": "Connection 'simple_ssh_connection' and local service 'SSH' conflict on 10.30.42.42:22", "paths": [ "/api/configuration/ssh/connections/12345", "/api/configuration/local_services/ssh" ] } ] } }, "meta": { "configuration": "/api/cluster/nodes/46f97a58-4028-467d-9a22-9cfe78ae3e1c", "href": "/api/cluster/status/46f97a58-4028-467d-9a22-9cfe78ae3e1c" } } ], "meta": { "href": "/api/cluster/status", "parent": "/api/cluster", "self": "/api/cluster/status/b35c54da-b556-4f91-ade5-d26283d68277" } }
Elements | Type | Description | ||
---|---|---|---|---|
items | Top-level element (list of JSON objects) | List of endpoints (objects) available from the current endpoint. | ||
key | string | The ID of the node. | ||
|
fqdn |
|
string |
The address of the node as a fully qualified domain name. |
|
health_status |
|
null or object |
The health status of a node. If the node is down, the value is null. Otherwise, the health-related data is listed. |
memory | floating point integer (percent) | Memory use | ||
disk | floating point integer (percent) | Hard disk use | ||
swap | floating point integer (percent) | Swap use | ||
load1 | floating point integer |
The average system load during the last one minute. The values mean the following:
| ||
load5 | floating point integer |
The average system load during the last five-minute period. The values mean the following:
| ||
load15 | floating point integer |
The average system load during the last fifteen-minute period. The values mean the following:
| ||
sessions | string |
The protocol type and the number of ongoing sessions. For example: "sessions": { "ssh": 3, "rdp": 4 }, | ||
total_sessions | integer (number of) | The total number of ongoing sessions. | ||
meta | Top-level item (JSON object) | Contains links to different parts of the REST service. | ||
configuration | string (relative path) | The path to the configuration of the node that returned the response. | ||
href | string (relative path) | The path to the node that returned the response. | ||
last_seen | string | The last time the node sent status information to the Central Management node, in ISO 8601 format. | ||
configuration_sync | Top-level item (JSON object) | |||
|
|
downloaded_xml_hash |
string |
The hash of the latest downloaded configuration file (used for configuration synchronization). If no configuration file has been downloaded yet, it says null. |
last_updated | string | The last time the node's configuration was synchronized, in ISO 8601 format. | ||
last_checked | string | The last time the node attempted to fetch a new configuration, in ISO 8601 format. | ||
issues | Top-level item (JSON object) | The issues that occurred during configuration synchronization. |
© ALL RIGHTS RESERVED. 利用規約 プライバシー Cookie Preference Center