NAME

Nagios::MKLivestatus::Class - Object-Oriented inteface for Nagios:: MKLivestatus

DESCRIPTION

This module is a Object-Oriented inteface for Nagios:: MKLivestatus.

The module is still in an early stage of development, there can be some change between releases.

REPOSITORY

Git: http://github.com/rbo/Nagios-MKLivestatus-Class

SYNOPSIS

use Nagios::MKLivestatus::Class;

my $class = Nagios::MKLivestatus::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;

ATTRIBUTES

peer

Connection point to the status check_mk livestatus Nagios addon. This can be a socket or a TCP connection.

Socket

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

TCP Connection

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

METHODS

table_sources

Arguments: none

Returns: @list

Get a list of all table class names.

table

Arguments: $table_name

Returns: $table_object

Returns a table object based on Nagios::MKLivestatus::Class::Base::Table

INTERNAL METHODS

BUILD

Initialises the internal Nagios::MKLivestatus object.

ENVIRONMENT VARIABLES

NAGIOS_MKLIVESTATUS_CLASS_TRACE

Print tracer output from this object.

NAGIOS_MKLIVESTATUS_CLASS_TEST_PEER

Set peer for live tests.

AUTHOR

Robert Bohne, <rbo at cpan.org>

TODO:

  • Bettering the documentation

BUGS

Please report any bugs or feature requests to bug-nagios-mklivestatus-class at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Nagios-MKLivestatus-Class. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Nagios::MKLivestatus::Class

You can also look for information at:

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.