Skip to content

Commit 5cc2265

Browse files
hyunjuVsimon-dew
authored andcommitted
Update list-cluster-nodes.adoc (#3698)
In the List Nodes with the REST API section, updated REST API command to output both the otpNode and hostname. This is because you need the otpNode value to be able to get detailed information about the node. Then, added an example of how to use the `/nodes/<otpNode>` URI to display detailed information about the node.
1 parent 9bee5e7 commit 5cc2265

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

modules/manage/pages/manage-nodes/list-cluster-nodes.adoc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,20 +133,29 @@ The method returns a large amount of information, which includes many of the det
133133
The output may be unformatted, and thereby difficult to read until formatting is applied.
134134

135135
The following call passes the result to the https://stedolan.github.io/jq/[jq^] command-line JSON processor for
136-
formatting, and then uses the standard command-line utility `grep` to reduce the output to available hostnames:
136+
formatting, and then uses the standard command-line utility `egrep` to reduce the output to available hostnames and otpNode names:
137137

138138
----
139139
curl -u Administrator:password -v -X GET \
140-
http://10.142.181.101:8091/pools/default | jq '.' | grep hostname
140+
http://10.142.181.101:8091/pools/default | jq '.' | egrep 'hostname|otpNode'
141141
----
142142

143143
The output is as follows:
144144

145145
----
146+
"otpNode": "[email protected]",
146147
"hostname": "10.142.181.101:8091",
148+
"otpNode": "[email protected]",
147149
"hostname": "10.142.181.102:8091",
148150
----
149151

152+
As shown in the example REST API command below, the otpNode value can be used with the `/nodes/<otpNode>` URI to retrieve detailed information about the node, including the storage paths for the services:
153+
154+
----
155+
curl -u Administrator:password -v -X GET \
156+
http://10.142.181.101:8091/nodes/[email protected] | jq '.'
157+
----
158+
150159
For more information, see xref:rest-api:rest-cluster-get.adoc[Retrieving Cluster Information].
151160

152161
[#next-steps-after-list-nodes]

0 commit comments

Comments
 (0)