Nodes usage

Introduced 1.0

The nodes usage endpoint returns low-level information about REST action usage on nodes.

Path and HTTP methods

  1. GET _nodes/usage
  2. GET _nodes/<nodeId>/usage
  3. GET _nodes/usage/<metric>
  4. GET _nodes/<nodeId>/usage/<metric>

Path parameters

You can include the following optional path parameters in your request.

ParameterTypeDescription
nodeIdStringA comma-separated list of nodeIds used to filter results. Supports node filters. Defaults to _all.
metricStringThe metrics that will be included in the response. You can set the string to either _all or rest_actions. rest_actions returns the total number of times an action has been called on the node. _all returns all stats from the node. Defaults to _all.

Query parameters

You can include the following optional query parameters in your request.

ParameterTypeDescription
timeoutTimeSets the time limit for a response from the node. Default is 30s.
cluster_manager_timeoutTimeSets the time limit for a response from the cluster manager. Default is 30s.

Example request

The following request returns usage details for all nodes:

  1. GET _nodes/usage

copy

Example response

The following is an example response:

  1. {
  2. "_nodes" : {
  3. "total" : 1,
  4. "successful" : 1,
  5. "failed" : 0
  6. },
  7. "cluster_name" : "opensearch-cluster",
  8. "nodes" : {
  9. "t7uqHu4SSuWObK3ElkCRfw" : {
  10. "timestamp" : 1665695174312,
  11. "since" : 1663994849643,
  12. "rest_actions" : {
  13. "opendistro_get_rollup_action" : 3,
  14. "nodes_usage_action" : 1,
  15. "list_dangling_indices" : 1,
  16. "get_index_template_action" : 258,
  17. "nodes_info_action" : 152665,
  18. "get_mapping_action" : 259,
  19. "get_data_streams_action" : 12,
  20. "cat_indices_action" : 6,
  21. "get_indices_action" : 3,
  22. "ism_explain_action" : 7,
  23. "nodes_reload_action" : 1,
  24. "get_policy_action" : 3,
  25. "PerformanceAnalyzerClusterConfigAction" : 2,
  26. "index_policy_action" : 1,
  27. "rank_eval_action" : 3,
  28. "search_action" : 592,
  29. "get_aliases_action" : 258,
  30. "document_mget_action" : 2,
  31. "document_get_action" : 30,
  32. "count_action" : 1,
  33. "main_action" : 1
  34. },
  35. "aggregations" : { }
  36. }
  37. }
  38. }

Required permissions

If you use the Security plugin, make sure you set the following permissions: cluster:manage/nodes or cluster:monitor/nodes.