Search...::Nodes(3pm)
β¨ Search...::Nodes π
okay bestie, so this is Search...::Nodes, from the Search::Elasticsearch::Client::1_0::Direct::Nodes module β it's the perl manpage (3pm section, iykyk) and it's literally your little bestie for talking to nodes. π¦
πΈ VERSION
version 6.81 β yes ma'am, we're on 6.81.
π DESCRIPTION
This module is the plug for making node-level requests β think pulling node info, node stats, all that cute stuff. π
It does Search::Elasticsearch::Role::Client::Direct β that's its whole personality.
π METHODS
β¨ info()
$response = $e->nodes->info(
node_id => $node_id | \@node_ids # optional
metric => $metric | \@metrics # optional
);
So info() hands you the static information about the nodes in your cluster β the boring-but-essential tea, like the configured max number of file handles, the max configured heap size, or the threadpool settings. no cap, it's useful. π
Allowed metrics are:
"http",
"jvm",
"network",
"os",
"plugin",
"process",
"settings",
"thread_pool",
"transport"
Query string parameters:
"flat_settings",
"human"
See the node_info docs <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html> for more information.
π stats()
$response = $e->nodes->stats(
node_id => $node_id | \@node_ids # optional
metric => $metric | \@metrics # optional
index_metric => $ind_metric | \@ind_metrics # optional
);
stats() is the glow-up version β it gives you statistics about your cluster's nodes: how many file handles are open right now, current heap memory usage, how many threads are in use. the numbers. the vibes. π
You can get stats for all the nodes, or just some of them by passing the node_id parameter. And by default you get all the metrics back β but you can narrow it down to just the ones in the metric parameter.
Allowed metrics are:
"_all",
"breaker",
"fs",
"http",
"indices",
"jvm",
"network",
"os",
"process",
"thread_pool",
"transport"
If you ask for the indices metric (or _all), then it's giving indices_stats information on a per-node basis. Which indices stats come back is up to you, bestie β control it with the index_metric parameter:
$response = $e->cluster->node_stats(
node_id => 'node_1',
metric => ['indices','fs']
index_metric => ['docs','fielddata']
);
Allowed index metrics are:
"_all",
"completion"
"docs",
"fielddata",
"filter_cache",
"flush",
"get",
"id_cache",
"indexing",
"merge",
"percolate",
"query_cache",
"refresh",
"search",
"segments",
"store",
"warmer"
Query string parameters:
"completion_fields",
"fielddata_fields",
"fields",
"groups",
"human",
"level",
"types"
See the node_stats docs <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html> for more information.
π₯ hot_threads()
$response = $e->nodes->hot_threads(
node_id => $node_id | \@node_ids # optional
)
When a node is being too much, hot_threads() is the diagnostic tool you want. π«Ά It literally takes a snapshot of which threads are eating the most CPU β a real "who's doing the most right now" moment.
Query string parameters:
"ignore_idle_threads",
"interval",
"snapshots",
"threads",
"type"
See the hot_threads docs <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html> for more information.
π shutdown()
$e->nodes->shutdown(
node_id => $node_id | \@node_ids # optional
);
shutdown() is the main character exit β it shuts down one or more nodes, or the entire cluster. yes, the whole thing. π
Query string parameters:
"delay",
"exit"
β οΈ bestie, this is shutting down nodes. be so serious when you call this one.
See the shutdown docs <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-shutdown.html> for more information.
π AUTHOR
Enrico Zimuel <enrico.zimuel@elastic.co> β ty for your service, icon. π
π COPYRIGHT AND LICENSE
This software is Copyright (c) 2020 by Elasticsearch BV.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
okay that's the whole page, you ate it up fr fr. this was Search...::Nodes(3pm) β perl v5.36.0, dated 2022-08-28 π¦π mwah, go make some node requests bestie β¨
π¦ where this page comes from
- ubuntu noble: libsearch-elasticsearch-client-1-0-perl 6.81-2 Β· Apache-2.0
- ubuntu resolute: libsearch-elasticsearch-client-1-0-perl 6.81-2 Β· Apache-2.0
- ubuntu stonking: libsearch-elasticsearch-client-1-0-perl 6.81-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms