NAME
Xymon::Plugin::Server::Dispatch - Xymon plugin dispatcher
SYNOPSIS
use Xymon::Plugin::Server::Dispatch;
use YourMonitor;
# dispatch to class
my $dispatch1 = Xymon::Plugin::Server::Dispatch
->new('test' => 'YourMonitor');
$dispatch1->run;
# dispatch to method
my $dispatch2 = Xymon::Plugin::Server::Dispatch
->new('test' => new YourMonitor());
$dispatch2->run;
# dispatch to CODEREF
my $dispatch3 = Xymon::Plugin::Server::Dispatch
->new('test' => sub { ... });
$dispatch3->run;
SUBROUTINES/METHODS
new(testName1 => ModuleName1, ...)
Create dispatch object for tests and modules.
If testName has wildcard character(like http:*), $test will be ARRAYREF when run method is called.
SUBROUTINES/METHODS
run
For every host listed in bb-hosts(Xymon 4.2) or hosts.cfg (Xymon 4.3), following operation is executed.
# if class name is given
my $module = YourMonitor->new($host, $test);
$module->run;
# if object is given
$module->run($host, $test);
# if CODEREF is given
&$code($host, $test);