NAME

Bio::GMOD::Admin::Monitor - Monitor the status of an installed MOD

SYNOPSIS

None. See below.

DESCRIPTION

You will not normally work with Bio::GMOD::Admin::Monitor objects directly. This parent class is intended to be subclassed by MOD developers who wish to provide internal monitoring capabilities for administrators.

PUBLIC METHODS

$monitor->generate_report(@options);

Generate a report for either emailing or logging as requested.

Options:
-components    An array reference of Bio::GMOD::Monitor::* objects tested
-email_report  Conditions under which to send emails [none]
-log_report    Conditions under which to log reports [all]
-email_to_ok   Default email address to send reports
-email_to_warn Supplemental address to send reports on failures
-email_from    Who to send the email from
-email_subject The subject of the email

The "-email_report" and "-log_report" options accept one of three values: none, all, failures. These correspond to conditions in which to email or log the report. For example, if --email_report is set to "failures" then only monitor processes that generate a failure will result in an email being generated.

Note that unless you specify set the email_report option to "none", you will also need to pass email_to, email_from, and email_subject.

$monitor->"accessor"

Bio::GMOD::Admin::Monitor also offers a number of common accessors for subclasses. Feel free to override these as necessary.

is_down, is_up

Returns true if the server/test is down/failed or is up/succeeded as appropriate

status

Synonym for is_down and is_up. Contents will be one of up or down.

testing

Name of the service or test.

tested_at

Date and time the service was tested.

initial_status_string, final_status_string

These two methods return a human readable formatted string suitable for display. initial_status_string contains the results of the first test of the service. final_status_string will only be populated if the first test failed and some action was necessary to restore the service.

BUGS

None reported.

SEE ALSO

Bio::GMOD

AUTHOR

Todd W. Harris <harris@cshl.org>.

Copyright (c) 2003-2005 Cold Spring Harbor Laboratory.

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