Toshimitsu FUJIWARA
and 1 contributors

NAME

Xymon::Plugin::Server::Hosts - Xymon bbhostgrep wrapper

SYNOPSIS

    use Xymon::Plugin::Server::Hosts;

    my $hosts = Xymon::Plugin::Server::Hosts->new();
    my @result = $hosts->grep('bbd');

    for my $entry (@result) {
        my ($ip, $host, $test) = @$entry;
        print "ip = $ip, host = $host, test = $test\n";
    }

SUBROUTINES/METHODS

new

Just a constructor. (Takes bbhostgrep options optionally)

grep(TEST)

Execute bbhostgrep and return its result.

Return value is an array like:

  (entry1, entry2, ...)

Each entiries are arrayref like:

  [ IP-address, hostname, tests ]

If TEST does not contain wildcard character ('*'), tests is a scalar value. Otherwise it is ARRAYREF contains test names which matchies TEST.