NAME
Watchdog::Service - Perl extension to monitor services
SYNOPSIS
use Watchdog::Service;
$s = new Watchdog::Service($name,$pstring);
print $s->id, $s->is_alive ? ' is alive' : ' is dead', "\n";
DESCRIPTION
Watchdog::Service is an extension for monitoring services running on a Unix host. The class provides a trivial method for determining whether a service is alive. More sophisticated methods can be implemented by creating subclasses of Watchdog::Service e.g. Watchdog::HTTPService uses the status of an HTTP 'GET' method to decide if a web server is alive.
EXAMPLE
use Watchdog::Service;
my @service = ( new Watchdog::Service('Apache','httpd'),
new Watchdog::Service('INN','innd'),
);
for ( @service ) {
print $_->id, $_->is_alive ? ' is alive' : ' is dead', "\n";
}
CLASS METHODS
new($name,$pstring)
Returns a new Watchdog::Service object. $name is a string which will identify the service to a human. $pstring is a string which can be used to identify a process providing the service.
OBJECT METHODS
id()
Return a string describing the Mysql service.
is_alive()
Returns true if the service is alive, else false.
SEE ALSO
Watchdog::HTTPService and Watchdog::MysqlService
AUTHOR
Paul Sharpe <paul@miraclefish.com>
COPYRIGHT
Copyright (c) 1998 Paul Sharpe. England. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.