IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Nodes feature usage API
editNodes feature usage API
editReturns information on the usage of features.
Request
editGET /_nodes/usage
GET /_nodes/<node_id>/usage
GET /_nodes/usage/<metric>
GET /_nodes/<node_id>/usage/<metric>
Prerequisites
edit-
If the Elasticsearch security features are enabled, you must have the
monitor
ormanage
cluster privilege to use this API.
Description
editThe cluster nodes usage API allows you to retrieve information on the usage of features for each node. All the nodes selective options are explained here.
Path parameters
edit-
<metric>
-
(Optional, string) Limits the information returned to the specific metrics. A comma-separated list of the following options:
-
_all
- Returns all stats.
-
rest_actions
- Returns the REST actions classname with a count of the number of times that action has been called on the node.
-
-
<node_id>
- (Optional, string) Comma-separated list of node IDs or names used to limit returned information.
Query parameters
edit-
timeout
-
(Optional, time units)
Period to wait for each node to respond. If a node does not respond before its
timeout expires, the response does not include its information. However, timed out
nodes are included in the response’s
_nodes.failed
property. Defaults to no timeout.
Examples
editRest action example:
resp = client.nodes.usage() print(resp)
response = client.nodes.usage puts response
const response = await client.nodes.usage(); console.log(response);
GET _nodes/usage
The API returns the following response:
{ "_nodes": { "total": 1, "successful": 1, "failed": 0 }, "cluster_name": "my_cluster", "nodes": { "pQHNt5rXTTWNvUgOrdynKg": { "timestamp": 1492553961812, "since": 1492553906606, "rest_actions": { "nodes_usage_action": 1, "create_index_action": 1, "document_get_action": 1, "search_action": 19, "nodes_info_action": 36 }, "aggregations": { ... } } } }