Nodes

class elasticsearch.client.NodesClient(client)
Parameters:

client (BaseClient)

clear_repositories_metering_archive(*, node_id, max_archive_version, error_trace=None, filter_path=None, human=None, pretty=None)

Removes the archived repositories metering information present in the cluster.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/clear-repositories-metering-archive-api.html

Parameters:
Return type:

ObjectApiResponse[Any]

get_repositories_metering_info(*, node_id, error_trace=None, filter_path=None, human=None, pretty=None)

Returns cluster repositories metering information.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/get-repositories-metering-api.html

Parameters:
Return type:

ObjectApiResponse[Any]

hot_threads(*, node_id=None, error_trace=None, filter_path=None, human=None, ignore_idle_threads=None, interval=None, master_timeout=None, pretty=None, snapshots=None, sort=None, threads=None, timeout=None, type=None)

Returns information about hot threads on each node in the cluster.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/cluster-nodes-hot-threads.html

Parameters:
  • node_id (str | Sequence[str] | None) – List of node IDs or names used to limit returned information.

  • ignore_idle_threads (bool | None) – If true, known idle threads (e.g. waiting in a socket select, or to get a task from an empty queue) are filtered out.

  • interval (Literal[-1] | ~typing.Literal[0] | str | None) – The interval to do the second sampling of threads.

  • master_timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

  • snapshots (int | None) – Number of samples of thread stacktrace.

  • sort (Literal['block', 'cpu', 'gpu', 'mem', 'wait'] | str | None) – The sort order for ‘cpu’ type (default: total)

  • threads (int | None) – Specifies the number of hot threads to provide information for.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • type (Literal['block', 'cpu', 'gpu', 'mem', 'wait'] | str | None) – The type to sample.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

TextApiResponse

info(*, node_id=None, metric=None, error_trace=None, filter_path=None, flat_settings=None, human=None, master_timeout=None, pretty=None, timeout=None)

Returns information about nodes in the cluster.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/cluster-nodes-info.html

Parameters:
  • node_id (str | Sequence[str] | None) – Comma-separated list of node IDs or names used to limit returned information.

  • metric (str | Sequence[str] | None) – Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest.

  • flat_settings (bool | None) – If true, returns settings in flat format.

  • master_timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

reload_secure_settings(*, node_id=None, error_trace=None, filter_path=None, human=None, pretty=None, secure_settings_password=None, timeout=None, body=None)

Reloads secure settings.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/secure-settings.html#reloadable-secure-settings

Parameters:
  • node_id (str | Sequence[str] | None) – The names of particular nodes in the cluster to target.

  • secure_settings_password (str | None) – The password for the Elasticsearch keystore.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

  • body (Dict[str, Any] | None)

Return type:

ObjectApiResponse[Any]

stats(*, node_id=None, metric=None, index_metric=None, completion_fields=None, error_trace=None, fielddata_fields=None, fields=None, filter_path=None, groups=None, human=None, include_segment_file_sizes=None, include_unloaded_segments=None, level=None, master_timeout=None, pretty=None, timeout=None, types=None)

Returns statistical information about nodes in the cluster.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/cluster-nodes-stats.html

Parameters:
  • node_id (str | Sequence[str] | None) – Comma-separated list of node IDs or names used to limit returned information.

  • metric (str | Sequence[str] | None) – Limit the information returned to the specified metrics

  • index_metric (str | Sequence[str] | None) – Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified.

  • completion_fields (str | Sequence[str] | None) – Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics.

  • fielddata_fields (str | Sequence[str] | None) – Comma-separated list or wildcard expressions of fields to include in fielddata statistics.

  • fields (str | Sequence[str] | None) – Comma-separated list or wildcard expressions of fields to include in the statistics.

  • groups (bool | None) – Comma-separated list of search groups to include in the search statistics.

  • include_segment_file_sizes (bool | None) – If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested).

  • include_unloaded_segments (bool | None) – If true, the response includes information from segments that are not loaded into memory.

  • level (Literal['cluster', 'indices', 'shards'] | str | None) – Indicates whether statistics are aggregated at the cluster, index, or shard level.

  • master_timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • types (Sequence[str] | None) – A comma-separated list of document types for the indexing index metric.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

usage(*, node_id=None, metric=None, error_trace=None, filter_path=None, human=None, pretty=None, timeout=None)

Returns low-level information about REST actions usage on nodes.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/cluster-nodes-usage.html

Parameters:
  • node_id (str | Sequence[str] | None) – A comma-separated list of node IDs or names to limit the returned information; use _local to return information from the node you’re connecting to, leave empty to get information from all nodes

  • metric (str | Sequence[str] | None) – Limits the information returned to the specific metrics. A comma-separated list of the following options: _all, rest_actions.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]