Skip to content

Commit c980043

Browse files
szabostevejrodewig
andauthored
[DOCS] Reformats nodes feature usage API (#45539)
Co-Authored-By: James Rodewig <[email protected]>
1 parent 92a4714 commit c980043

File tree

1 file changed

+53
-19
lines changed

1 file changed

+53
-19
lines changed

docs/reference/cluster/nodes-usage.asciidoc

Lines changed: 53 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,67 @@
11
[[cluster-nodes-usage]]
22
=== Nodes Feature Usage
33

4-
[float]
5-
==== Nodes usage
4+
Returns information on the usage of features.
65

7-
The cluster nodes usage API allows to retrieve information on the usage
8-
of features for each node.
6+
7+
[[cluster-nodes-usage-api-request]]
8+
==== {api-request-title}
9+
10+
`GET /_nodes/usage` +
11+
12+
`GET /_nodes/{node_id}/usage` +
13+
14+
`GET /_nodes/usage/{metric}` +
15+
16+
`GET /_nodes/{node_id}/usage/{metric}`
17+
18+
19+
[[cluster-nodes-usage-api-desc]]
20+
==== {api-description-title}
21+
22+
The cluster nodes usage API allows you to retrieve information on the usage
23+
of features for each node. All the nodes selective options are explained
24+
<<cluster-nodes,here>>.
25+
26+
27+
[[cluster-nodes-usage-api-path-params]]
28+
==== {api-path-parms-title}
29+
30+
`{metric}`::
31+
(Optional, string) Limits the information returned to the specific metrics.
32+
A comma-separated list of the following options:
33+
+
34+
--
35+
`_all`::
36+
Returns all stats.
37+
38+
`rest_actions`::
39+
Returns the REST actions classname with a count of the number of times
40+
that action has been called on the node.
41+
--
42+
43+
include::{docdir}/rest-api/common-parms.asciidoc[tag=node-id]
44+
45+
46+
[[cluster-nodes-usage-api-query-params]]
47+
==== {api-query-parms-title}
48+
49+
include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
50+
51+
52+
[[cluster-nodes-usage-api-example]]
53+
==== {api-examples-title}
54+
55+
Rest action example:
956

1057
[source,js]
1158
--------------------------------------------------
1259
GET _nodes/usage
13-
GET _nodes/nodeId1,nodeId2/usage
1460
--------------------------------------------------
1561
// CONSOLE
1662
// TEST[setup:node]
17-
// TEST[s/nodeId1,nodeId2/*/]
18-
19-
The first command retrieves usage of all the nodes in the cluster. The
20-
second command selectively retrieves nodes usage of only `nodeId1` and
21-
`nodeId2`. All the nodes selective options are explained
22-
<<cluster-nodes,here>>.
23-
24-
[float]
25-
[[rest-usage]]
26-
===== REST actions usage information
2763

28-
The `rest_actions` field in the response contains a map of the REST
29-
actions classname with a count of the number of times that action has
30-
been called on the node:
64+
The API returns the following response:
3165

3266
[source,js]
3367
--------------------------------------------------
@@ -61,4 +95,4 @@ been called on the node:
6195
<1> Timestamp for when this nodes usage request was performed.
6296
<2> Timestamp for when the usage information recording was started. This is
6397
equivalent to the time that the node was started.
64-
<3> Search action has been called 19 times for this node.
98+
<3> Search action has been called 19 times for this node.

0 commit comments

Comments
 (0)