Nodes feature usage API

Nodes feature usage API

New API reference

For the most up-to-date API details, refer to Cluster APIs.

Returns information on the usage of features.

Request

GET /_nodes/usage

GET /_nodes/<node_id>/usage

GET /_nodes/usage/<metric>

GET /_nodes/<node_id>/usage/<metric>

Prerequisites

  • If the Elasticsearch security features are enabled, you must have the monitor or manage cluster privilege to use this API.

Description

The 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

<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

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

Rest action example:

  1. resp = client.nodes.usage()
  2. print(resp)
  1. response = client.nodes.usage
  2. puts response
  1. const response = await client.nodes.usage();
  2. console.log(response);
  1. GET _nodes/usage

The API returns the following response:

  1. {
  2. "_nodes": {
  3. "total": 1,
  4. "successful": 1,
  5. "failed": 0
  6. },
  7. "cluster_name": "my_cluster",
  8. "nodes": {
  9. "pQHNt5rXTTWNvUgOrdynKg": {
  10. "timestamp": 1492553961812,
  11. "since": 1492553906606,
  12. "rest_actions": {
  13. "nodes_usage_action": 1,
  14. "create_index_action": 1,
  15. "document_get_action": 1,
  16. "search_action": 19,
  17. "nodes_info_action": 36
  18. },
  19. "aggregations": {
  20. ...
  21. }
  22. }
  23. }
  24. }

Timestamp for when this nodes usage request was performed.

Timestamp for when the usage information recording was started. This is equivalent to the time that the node was started.

Search action has been called 19 times for this node.