Search...::Nodes(3pm)

πŸ“¦
version 8.12 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Okay bestie, this page is Search...::Nodes(3pm) β€” like, that's the manual page name, iykyk. The actual module it's talking about is Search::Elasticsearch::Client::8_0::Direct::Nodes, and it's a client for running node-level requests. That's the whole vibe. Node stuff. πŸ’…


✨ VERSION ✨

version 8.12 β€” that's the one, no cap. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

So this module is the one that hands you methods for making node-level requests β€” the kind where you're like "hey what's up with my nodes" and it's like "here's info, here's stats". Very main character of it, honestly. 🌸

It does Search::Elasticsearch::Role::Client::Direct. That's the role it consumes, periodt.


πŸ‘‘ METHODS πŸ‘‘

🌈 info()

$response = $e->nodes->info(
    node_id => $node_id | \@node_ids       # optional
    metric  => $metric  | \@metrics        # optional
);

The info() method pulls static information about the nodes in your cluster. We're talking stuff like the configured max number of file handles, the max configured heap size, threadpool settings β€” the whole little biography of a node. Obsessed. πŸ’–

Allowed metrics are:

  • "http",
  • "jvm",
  • "network",
  • "os",
  • "plugin",
  • "process",
  • "settings",
  • "thread_pool",
  • "timeout",
  • "transport"

Query string parameters:

  • "error_trace",
  • "flat_settings",
  • "human"

See the node_info docs at 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
);

The stats() method is giving statistics about the nodes in your cluster β€” like how many file handles are open right this second, current heap memory usage, current number of threads in use. Real numbers, real time, real slay. πŸ”₯

Stats can come back for all nodes, or you can limit it to particular nodes with the node_id parameter. By default all metrics are returned, but you can limit those to whatever you put in the metric parameter. Your call, bestie. ✨

Allowed metrics are:

  • "_all",
  • "breaker",
  • "fs",
  • "http",
  • "include_segment_file_sizes",
  • "indices",
  • "jvm",
  • "network",
  • "os",
  • "process",
  • "thread_pool",
  • "timeout",
  • "transport"

If you specify the indices metric (or _all), then indices_stats information comes back on a per-node basis. And which indices stats you get? That's controlled by the index_metric parameter:

$response = $e->nodes->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",
  • "error_trace",
  • "fielddata_fields",
  • "fields",
  • "groups",
  • "human",
  • "level",
  • "types"

See the stats docs at 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
)

The hot_threads() method is the diagnostic tool you reach for when a node is being busy and dramatic. It takes a snapshot of which threads are eating the most CPU. It's giving detective energy. πŸ”

Query string parameters:

  • "error_trace",
  • "human",
  • "ignore_idle_threads",
  • "interval",
  • "snapshots",
  • "threads",
  • "timeout",
  • "type"

See the hot_threads docs at http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html for more information. 🌸


🌈 reload_secure_settings()

$response = $e->nodes->reload_secure_settings(
    node_id => $node_id | \@node_ids    # optional
);

The reload_secure_settings() API reloads the reloadable settings stored in the keystore on each node. Fresh settings, fresh vibes. 🧚

Query string parameters:

  • "error_trace",
  • "filter_path",
  • "human",
  • "timeout"

See the reload-secure-settings docs at https://www.elastic.co/guide/en/elasticsearch/reference/current/secure-settings.html for more information. ✨


🌈 usage()

$response = $e->nodes->usage(
    node_id => $node_id | \@node_ids       # optional
    metric  => $metric  | \@metrics        # optional
)

The usage() API retrieves information on the usage of features for each node. Yeah, it's per-node receipts. πŸ’…

Query string parameters:

  • "error_trace",
  • "human",
  • "timeout"

See the nodes_usage docs at https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-usage.html for more information. πŸŽ€


πŸ’… AUTHOR πŸ’…

Enrico Zimuel <enrico.zimuel@elastic.co> β€” the icon who wrote this. πŸ‘‘


This software is Copyright (c) 2024 by Elasticsearch BV.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004

And that's the whole page, bestie! πŸ¦‹ This was Search...::Nodes(3pm) from perl v5.38.2, dated 2024-02-04. Go forth and query your nodes, you gorgeous little cluster whisperer. πŸŒˆπŸ’–πŸ«Ά

πŸ“¦ where this page comes from