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)
Clear the archived repositories metering. 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)
Get cluster repositories metering. Get repositories metering information for a cluster. This API exposes monotonically non-decreasing counters and it is 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 will not be present after node restarts.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/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)
Get the hot threads for nodes. Get a breakdown of the hot threads on each selected node in the cluster. The output is plain text with a breakdown of the top hot threads for each node.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/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)
Get node information. By default, the API returns all attributes and core settings for cluster nodes.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/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)
Reload the keystore on nodes in the cluster. Secure settings are stored in an on-disk keystore. Certain of these settings are reloadable. That is, you can change them on disk and reload them without restarting any nodes in the cluster. When you have updated reloadable secure settings in your keystore, you can use this API to reload those settings on each node. When the Elasticsearch keystore is password protected and not simply obfuscated, you must provide the password for the keystore when you reload the secure settings. Reloading the settings for the whole cluster assumes that the keystores for all nodes are protected with the same password; this method is allowed only when inter-node communications are encrypted. Alternatively, you can reload the secure settings on each node by locally accessing the API and passing the node-specific Elasticsearch keystore password.
- 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)
Get node statistics. Get statistics for nodes in a cluster. By default, all stats are returned. You can limit the returned information by using metrics.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/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)
Get feature usage information.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/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: