|
1 | 1 | [[cluster-nodes-usage]]
|
2 | 2 | === Nodes Feature Usage
|
3 | 3 |
|
4 |
| -[float] |
5 |
| -==== Nodes usage |
| 4 | +Returns information on the usage of features. |
6 | 5 |
|
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: |
9 | 56 |
|
10 | 57 | [source,js]
|
11 | 58 | --------------------------------------------------
|
12 | 59 | GET _nodes/usage
|
13 |
| -GET _nodes/nodeId1,nodeId2/usage |
14 | 60 | --------------------------------------------------
|
15 | 61 | // CONSOLE
|
16 | 62 | // 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 |
27 | 63 |
|
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: |
31 | 65 |
|
32 | 66 | [source,js]
|
33 | 67 | --------------------------------------------------
|
@@ -61,4 +95,4 @@ been called on the node:
|
61 | 95 | <1> Timestamp for when this nodes usage request was performed.
|
62 | 96 | <2> Timestamp for when the usage information recording was started. This is
|
63 | 97 | 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