package Search::Elasticsearch::Client::6_0::Direct::Cat; $Search::Elasticsearch::Client::6_0::Direct::Cat::VERSION = '6.80'; use Moo; with 'Search::Elasticsearch::Client::6_0::Role::API'; with 'Search::Elasticsearch::Role::Client::Direct'; use Search::Elasticsearch::Util qw(parse_params); use namespace::clean; __PACKAGE__->_install_api('cat'); #=================================== sub help { #=================================== my ( $self, $params ) = parse_params(@_); $params->{help} = 1; my $defn = $self->api->{'cat.help'}; $self->perform_request( $defn, $params ); } #=================================== around 'perform_request' => sub { #=================================== my $orig = shift; my $self = shift; my ( $defn, $params ) = parse_params(@_); if ( $params->{help} && $params->{help} ne 'false' ) { $defn = { %$defn, parts => {} }; } return $orig->( $self, $defn, $params ); }; 1; =pod =encoding UTF-8 =head1 NAME Search::Elasticsearch::Client::6_0::Direct::Cat - A client for running cat debugging requests =head1 VERSION version 6.80 =head1 DESCRIPTION The C API in Elasticsearch provides information about your cluster and indices in a simple, easy to read text format, intended for human consumption. These APIs have a number of parameters in common: =over =item * C Returns help about the API, eg: say $e->cat->allocation(help => 1); =item * C Includes the column headers in the output: say $e->cat->allocation(v => 1); =item * C Accepts a list of column names to be output, eg: say $e->cat->indices(h => ['health','index']); =item * C Formats byte-based values as bytes (C), kilobytes (C), megabytes (C) or gigabytes (C) =back It does L. =head1 METHODS =head2 C say $e->cat->help; Returns the list of supported C APIs =head2 C say $e->cat->aliases( name => 'name' | \@names # optional ); Returns information about index aliases, optionally limited to the specified index/alias names. Query string parameters: C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->allocation( node_id => 'node' | \@nodes # optional ); Provides a snapshot of how shards have located around the cluster and the state of disk usage. Query string parameters: C, C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->count( index => 'index' | \@indices # optional ); Provides quick access to the document count of the entire cluster, or individual indices. Query string parameters: C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->fielddata( fields => 'field' | \@fields # optional ); Shows the amount of memory used by each of the specified `fields` (or all fields) loaded into fielddata. Query string parameters: C, C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->health(); Provides a snapshot of how shards have located around the cluster and the state of disk usage. Query string parameters: C, C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->indices( index => 'index' | \@indices # optional ); Provides a summary of index size and health for the whole cluster or individual indices Query string parameters: C, C, C, C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->master(); Displays the master’s node ID, bound IP address, and node name. Query string parameters: C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->nodeattrs(); Returns the node attributes set per node. Query string parameters: C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->nodes(); Provides a snapshot of all of the nodes in your cluster. Query string parameters: C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->pending_tasks(); Returns any cluster-level tasks which are queued on the master. Query string parameters: C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->plugins(); Returns information about plugins installed on each node. Query string parameters: C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->recovery( index => 'index' | \@indices # optional ); Provides a view of shard replication. It will show information anytime data from at least one shard is copying to a different node. It can also show up on cluster restarts. If your recovery process seems stuck, try it to see if there’s any movement using C. Query string parameters: C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->repositories() Provides a list of registered snapshot repositories. Query string parameters: C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->segments( index => 'index' | \@indices # optional ); Provides low level information about the segments in the shards of an index. Query string parameters: C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->shards( index => 'index' | \@indices # optional ); Provides a detailed view of what nodes contain which shards, the state and size of each shard. Query string parameters: C, C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->snapshots( repository => 'repository' | \@repositories # optional ) Provides a list of all snapshots that belong to the specified repositories. Query string parameters: C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->tasks() Provides a list of node-level tasks. Query string parameters: C, C, C, C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->templates( name => $name # optional ) Provides a list of index templates. Query string parameters: C, C, C, C, C, C, C, C, C See the L for more information. =head2 C say $e->cat->thread_pool( index => 'index' | \@indices # optional ); Shows cluster wide thread pool statistics per node. By default the C, C and C statistics are returned for the C, C and C thread pools. Query string parameters: C, C, C, C, C, C, C, C, C, C See the L for more information. =head1 AUTHOR Enrico Zimuel =head1 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 =cut __END__ # ABSTRACT: A client for running cat debugging requests