Search...::Nodes(3pm)

πŸ’– Search...::Nodes β€” the client for node-level requests, bestie

okay so this is Search::Elasticsearch::Client::2_0::Direct::Nodes, a page from the User Contributed Perl Documentation (yes, the 3pm crowd), and it's literally the module that lets you poke at individual nodes in your Elasticsearch cluster. node gossip. node stats. node drama. we love her. πŸŽ€


✨ VERSION ✨

version 6.81 β€” that's the one, no cap.


🌸 DESCRIPTION 🌸

This module hands you the methods for making node-level requests, like grabbing node info and node stats. it's giving "let me check on my nodes real quick." πŸ’…

It does Search::Elasticsearch::Role::Client::Direct β€” iykyk, that's the role behind the curtain doing the heavy lifting. 🧚


πŸ”₯ METHODS πŸ”₯

πŸ’« info()

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

The info() method returns static information about the nodes in the cluster β€” like the configured max number of file handles, the max configured heap size, or the threadpool settings. it's the "tell me about yourself" icebreaker of node requests. 🫢

Allowed metrics are:

  • http
  • jvm
  • network
  • os
  • plugin
  • process
  • settings
  • thread_pool
  • timeout
  • 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
);

The stats() method returns statistics about the nodes in the cluster β€” how many file handles are currently open, current heap memory usage, current number of threads in use. the whole vibe check. πŸ“Š

Stats can be returned for all nodes, or you can limit them to particular nodes with the node_id parameter. By default all metrics come back, but you can limit them to whatever you name in the metric parameter. you're the main character, you decide.

Allowed metrics are:

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

If the indices metric (or _all) is specified, then indices_stats information is returned on a per-node basis. Which indices stats come back can be controlled 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
)

The hot_threads() method is a genuinely useful tool for diagnosing busy nodes β€” it takes a snapshot of which threads are consuming the most CPU. obsessed with how it just tells you who's being loud. πŸ’€πŸ”₯

Query string parameters:

  • ignore_idle_threads
  • interval
  • snapshots
  • threads
  • timeout
  • type

See the hot_threads docs <http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html> for more information. πŸ‘‘


πŸŽ€ AUTHOR πŸŽ€

Enrico Zimuel <enrico.zimuel@elastic.co> β€” icon, legend, the moment. πŸ’œ


This software is Copyright (c) 2020 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 written for perl v5.32.0, dated 2020-11-25, and yeah β€” it's the Search...::Nodes(3pm) page. slay, go check your nodes. βœ¨πŸ“