Monito...:Table(3pm)
π Monitoring::Livestatus::Class::Base::Table β the manual page, but make it make sense β¨
okay bestie, gather round π«Ά this is the man page for Monitoring::Livestatus::Class::Base::Table, living in the User Contributed Perl Documentation corner of 3pm. It's the base class for all table objects β like, the mother of every table object in this whole situation. π
πΈ NAME πΈ
Monitoring::Livestatus::Class::Base::Table β bestie, it's the base class for all table objects. no cap.
β¨ SYNOPSIS β¨
here's the vibe, copy it exactly, don't freestyle:
my $class = Monitoring::Livestatus::Class->new(
backend => 'INET',
socket => '10.211.55.140:6557',
);
my $table_obj = $class->table('services');
my $data = $table_obj->search( {} )->hashref_array();
literally that's it. build the class, grab a table, search it, dump it. iconic behavior. π
π ATTRIBUTES π
ctx
it's a reference to the context object Monitoring::Livestatus::Class. your whole world, basically. π¦
filter
a reference to the filter object Monitoring::Livestatus::Class. (yes, the original says filter object for this one too β I'm just telling you what it says π)
stats
a reference to the filter object Monitoring::Livestatus::Class. same energy as above, different attribute name.
table_name
contains the table name. that's the whole job. the name. of the table. π
statments
contains all the statments. (spelled exactly like that in the source β I am NOT touching it, that's a real attribute name and I respect it π)
options
contains all the options. lowkey essential, highkey underrated.
π METHODS π
columns
Arguments: $colA, $colB, ... (however many you want, go off π)
Return: $self
sets columns. that's the move. setting columns. slay.
headers
returns an array, or a reference to an array, depending on the calling context β of all header columns. context-sensitive, main character energy. β
filter
example usage, verbatim bestie:
$table_obj->search( { name => 'localhost' } );
$table_obj->search( { name => [ 'localhost', 'gateway' ] } );
$table_obj->search( [ { name => 'localhost' }, { name => 'gateway' } ] );
Returns: $self
look at those three forms β single value, arrayref of values, arrayref of hashrefs. all of them valid. we love range. π
hashref_array
returns an array, or a reference to an array, depending on the calling context. so choose your fighter. π§
example usage:
my $hashref_array = $table_obj->search( { } )->hashref_array;
print Dumper $hashref_array;
hashref_pk
returns a hash of hash references.
example usage:
my $hashref_pk = $table_obj->search( { } )->hashref_pk();
print Dumper $hashref_pk;
primary-key-keyed hashes?? obsessed. π₯
has_single_primary_key
(no extra deets in the source, bestie β it's just here, chilling, existing.)
single_primary_key
(also just vibing here with no description. we love a mysterious queen. π)
build_table_name
(same β listed, no description. mysterious.)
build_primary_keys
(and this one too. it's giving β¨enigmaticβ¨.)
π«Ά AUTHOR π«Ά
see "AUTHOR" in Monitoring::Livestatus::Class and "CONTRIBUTORS" in Monitoring::Livestatus::Class. go read the parent page, bestie, that's where the credits live.
π COPYRIGHT & LICENSE π
Copyright 2009 Robert Bohne.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
fr fr, read that license before you go redistributing anything. it's not a suggestion, it's the rules. π
and that's the whole page, bestie! π this was generated as part of perl v5.26.2, dated 2018-05-06, and it's filed under the 3pm manual section. mwah, go build some tables. πΈπ¦β¨
π¦ where this page comes from
- debian bookworm: libmonitoring-livestatus-class-perl 0.06-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmonitoring-livestatus-class-perl 0.06-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libmonitoring-livestatus-class-perl 0.06-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmonitoring-livestatus-class-perl 0.06-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms