Monito...::Class(3pm)

πŸ“¦
version 0.06 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– Monitoring::Livestatus::Class β€” the user-contributed Perl docs page, but make it cute πŸ’–

okay bestie, so this is the manual page for Monitoring::Livestatus::Class(3pm) β€” it lives in the User Contributed Perl Documentation section, and we're about to get into it. buckle up πŸŽ€


✨ NAME ✨

Monitoring::Livestatus::Class β€” an Object-Oriented interface for Monitoring::Livestatus πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So basically this module is an object-oriented interface for Monitoring::Livestatus. that's the whole vibe. 🌸

ngl though β€” this module is still in an early stage of development, so heads up: there can be some API changes between releases. yes fr fr, things might shift under you. it's giving "we're still cooking" πŸ‘©πŸ³


🌈 REPOSITORY 🌈

the code lives here, go be nosy:

Git: http://github.com/rbo/Monitoring-Livestatus-Class

✨ SYNOPSIS ✨

here's the whole thing in action, look at her go πŸ‘‘

use Monitoring::Livestatus::Class;

my $class = Monitoring::Livestatus::Class->new(
    peer => '/var/lib/nagios3/rw/livestatus.sock'
);

my $hosts = $class->table('hosts');
my @data = $hosts->columns('display_name')->filter(
    { display_name => { '-or' => [qw/test_host_47 test_router_3/] } }
)->hashref_array();
print Dumper \@data;

ate. no crumbs. πŸ’…


πŸ’œ ATTRIBUTES πŸ’œ

peer

this is the connection point to the status check_mk livestatus addon. and here's the tea: it can be a unix domain socket or a tcp socket. either way, she's connecting. 🫢

Socket

my $class = Monitoring::Livestatus::Class->new(
    peer => '/var/lib/nagios3/rw/livestatus.sock'
);

TCP Connection

my $class = Monitoring::Livestatus::Class->new(
    peer => '192.168.1.1:2134'
);

πŸŽ€ METHODS πŸŽ€

table_sources

  • Arguments: none
  • Returns: @list

Get a list of all the table class names. the whole roster, bestie. ✨

table

  • Arguments: $table_name
  • Returns: $table_object

Returns a table object based on Monitoring::Livestatus::Class::Base::Table. she's built different (literally, off that base class) πŸ’…


πŸ”§ INTERNAL METHODS πŸ”§

these are the behind-the-scenes girlies, iykyk πŸ™ˆ

BUILD

Initializes the internal Monitoring::Livestatus object. doing the setup work so you don't have to. 🌸

TRACE

Get the trace level. that's it, that's the method. πŸ‘‘


🌟 ENVIRONMENT VARIABLES 🌟

MONITORING_LIVESTATUS_CLASS_TRACE

Print tracer output from this object. she's chatty and we love that for her πŸ’¬

MONITORING_LIVESTATUS_CLASS_TEST_PEER

Set peer for live tests. πŸ§ͺ


πŸ’– AUTHOR πŸ’–

Robert Bohne, "<rbo at cpan.org>" β€” the icon, the moment, the main character πŸ‘‘


🌸 CONTRIBUTORS 🌸

  • nierlein: Sven Nierlein <nierlein@cpan.org> β€” bestie showed up and helped, we stan 🫢

πŸ“ TODO: πŸ“

  • Bettering the documentation

yes bestie, the docs could be better, they said it not me 😭


πŸ’€ BUGS πŸ’€

found a bug? a feature request? pls don't suffer in silence. report it to "bug-Monitoring-Livestatus-Class at rt.cpan.org", or slide through the web interface at:

<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Monitoring-Livestatus-Class>

🫢 SUPPORT 🫢

you can find the docs for this module with the perldoc command, like so:

perldoc Monitoring::Livestatus::Class

and you can also look for info at:

  • RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Monitoring-Livestatus-Class>
  • AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/Monitoring-Livestatus-Class>
  • CPAN Ratings
<http://cpanratings.perl.org/d/Monitoring-Livestatus-Class>
  • Search CPAN
<http://search.cpan.org/dist/Monitoring-Livestatus-Class/>

Copyright 2009 Robert Bohne.

This program is free software; you can redistribute it and/or modify it under the same terms as 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.


and that's the whole page, bestie πŸ’– this was perl v5.26.2, dated 2018-05-06, and it's the Monito...::Class(3pm) page β€” thanks for reading the whole thing, you're literally the best, mwah πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from