The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Nagios::Status::HostStatus - Nagios 3.0 Class to maintain Hosts' Status.

VERSION

Version 0.01

SYNOPSIS

    # Import the Module
    use Nagios::Status::HostStatus

    # Instantiate the HostStatus Object
    my $status = Nagios::Status::HostStatus->new($nagios_status_log_path);
        # OR
    my $status = Nagios::Status::HostStatus->new($nagios_status_log_path, $host1, $host2, ...);

    # Get hosts that are up.
    my $up = $status->check_up;

    # Get hosts that are down.
    my $down = $status->check_down;

    # Get hosts that are unreachable.
    my $unreach = $status->check_unreachable;

DESCRIPTION

This module is an object oriented approach to Nagios 3.0 status hosts.

OBJECT CREATION METHOD

new
 my $status = Nagios::Status::HostStatus->new($nagios_status_log_path [, $host1 .. $hostN]);

This class constructs a Nagios::Status::HostStatus object. It requires one parameter. A file path containing the path to the Nagios status.log file. There is an optional parameter. An array of host names can be specified, whereby only those domains will be populated.

METHODS

check_up
 my $hosts_up = $status->check_up;

This method takes no parameters. It returns an array reference to all hosts found to be UP. Otherwise, it returns undefined.

check_down
 my $hosts_down = $status->check_down;

This method takes no parameters. It returns an array reference to all hosts found to be DOWN. Otherwise, it returns undefined.

check_unreachable
 my $hosts_unreach = $status->check_unreachable;

This method takes no parameters. It returns an array reference to all hosts found to be UNREACHABLE. Otherwise, it returns undefined.

AUTHOR

Roy Crowder, <rcrowder at cpan.org>

SEE ALSO

Nagios::Status::Host, perl, Changes

BUGS

Please report any bugs or feature requests to bug-nagios-status-hoststatus at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Nagios-Status-HostStatus. 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::Status::HostStatus

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2009 WorldSpice Technologies, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.