...
Nodes can be managed using REST API.
Node creation
New node is created automatically when WCS server, which is not in the database, connects to backend server.
Node changing
The node Node parameters can be changed with REST API query /api/node/update
Code Block | ||||
---|---|---|---|---|
| ||||
https://hostname:8090/api/node/update { "id": "15", "profiles": ["14", "17"] } |
Where:
- id – node identifier
- profiles – profile identifies list by list of identifiers of profiles defining which metrics are aquired fron acquired from this node
Node deletion
The A node can be deleted with REST API query /api/node/delete
Code Block | ||||
---|---|---|---|---|
| ||||
https://hostname:8090/api/node/delete { "id": "3" } |
Where:
- id – node identifier
This The node monitoring stops when node it is deleted.
Obtaining node information
The node Node information can be obtained with REST API query /api/node/list
Code Block | ||||
---|---|---|---|---|
| ||||
https://hostname:8090/api/node/list { "id": "3" } |
Where:
- id – node identifier
If node Id is set, the response will contain this only that node information only. If Id is not set, the response will contain list with all the nodes list on backend server.
The response contains the following fields
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "id": 3, "host": "95.191.131.64", "profiles": [ 2 ] } ] |
Where:
- id – node identifier
- host - WCS server address
- profiles - profiles list
Obtaining node current state
The node Node current state can be obtained with REST API query /api/node_status/list
Code Block | ||||
---|---|---|---|---|
| ||||
https://hostname:8090/api/node_status/list { "id": "13" } |
Where:
- id – node identifier
If node Id is set, the response will contain this only that node state only. If Id is not set, the response will contain current state of all the nodes current state on backend server.
The response contains the following fields
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "id": 15, "connectTimestamp": 1545645928951, "connectCounter": 1, "connected": true, "rate": 0 } ] |
ЗдесьWhere
- id – node identifier
- connectTimeStamp – current connection timestamp
- connectCounter – current connection tries attempts count
- connected – is if the connection is established
- rate – metrics aquisition acquisition rate