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)
You can use this API to clear the archived repositories metering information in the cluster.
- Parameters:
node_id (str | Sequence[str]) – Comma-separated list of node IDs or names used to limit returned information. All the nodes selective options are explained [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes).
max_archive_version (int) – Specifies the maximum [archive_version](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html#get-repositories-metering-api-response-body) to be cleared from the archive.
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- get_repositories_metering_info(*, node_id, error_trace=None, filter_path=None, human=None, pretty=None)
You can use the cluster repositories metering API to retrieve repositories metering information in a cluster. This API exposes monotonically non-decreasing counters and it’s expected that clients would durably store the information needed to compute aggregations over a period of time. Additionally, the information exposed by this API is volatile, meaning that it won’t be present after node restarts.
https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-repositories-metering-api.html
- Parameters:
node_id (str | Sequence[str]) – Comma-separated list of node IDs or names used to limit returned information. All the nodes selective options are explained [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes).
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- 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)
This API yields a breakdown of the hot threads on each selected node in the cluster. The output is plain text with a breakdown of each node’s top hot threads.
https://www.elastic.co/guide/en/elasticsearch/reference/8.16/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 (str | Literal[-1] | ~typing.Literal[0] | None) – The interval to do the second sampling of threads.
master_timeout (str | Literal[-1] | ~typing.Literal[0] | 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 (str | Literal['block', 'cpu', 'gpu', 'mem', 'wait'] | None) – The sort order for ‘cpu’ type (default: total)
threads (int | None) – Specifies the number of hot threads to provide information for.
timeout (str | Literal[-1] | ~typing.Literal[0] | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
type (str | Literal['block', 'cpu', 'gpu', 'mem', 'wait'] | None) – The type to sample.
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- 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 cluster nodes information.
https://www.elastic.co/guide/en/elasticsearch/reference/8.16/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 (str | Literal[-1] | ~typing.Literal[0] | 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 (str | Literal[-1] | ~typing.Literal[0] | 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)
human (bool | None)
pretty (bool | None)
- Return type:
- 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 the keystore on nodes in the cluster.
- 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 (str | Literal[-1] | ~typing.Literal[0] | 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)
human (bool | None)
pretty (bool | None)
- Return type:
- 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 cluster nodes statistics.
https://www.elastic.co/guide/en/elasticsearch/reference/8.16/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 (str | Literal['cluster', 'indices', 'shards'] | None) – Indicates whether statistics are aggregated at the cluster, index, or shard level.
master_timeout (str | Literal[-1] | ~typing.Literal[0] | 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 (str | Literal[-1] | ~typing.Literal[0] | 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)
human (bool | None)
pretty (bool | None)
- Return type:
- usage(*, node_id=None, metric=None, error_trace=None, filter_path=None, human=None, pretty=None, timeout=None)
Returns information on the usage of features.
https://www.elastic.co/guide/en/elasticsearch/reference/8.16/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 (str | Literal[-1] | ~typing.Literal[0] | 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)
human (bool | None)
pretty (bool | None)
- Return type: