XAS::Monitor::Database - A Perl extension for the XAS environment
use XAS::Monitor::Database my $monitor = XAS::Monitor::Database->new( -alias => 'monitor', -logger => 'logger', -schedule => '*/1 * * * *', );
This module inherits from XAS::Monitor::Base and provides a base class for monitors that monitor items within a databae.
This method initializes the module and take these three parameters:
The name of this session.
The alias for the logger session.
The schedule to follow when monitoring. It defaults to: "*/1 * * * *". Which is do something once a minute.
This method declares the event "monitor" and opens the connection to the database.
This method stops the "monitor" processing and closes the database connection.
The method that does the actual monitoring. By default it does nothing and needs to be overridden. The overridden method takes two parameters:
This event schedules the processing of "monitor" with the supplied schedule.
This is triggered by a "shutdown" event and calls the cleanup() method.
This is triggered by the schedule and calls the monitor() method.
Kevin Esteb, <email@example.com>
Copyright (C) 2009 by Kevin L. Esteb
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.