VBTK::Server is the main server process for the VBTK toolkit.
SYNOPSIS
Note that defining a VBTK::Server makes use of several modules. A typical configuration would look something like this:
use VBTK::Server
use VBTK::Actions::Email
use VBTK::Actions::Email::Page
# Setup email actions
new VBTK::Actions::Email ( Name => 'emailMe', To => 'me@mydomain.com' );
new VBTK::Actions::Email ( Name => 'emailBob', To => 'bob@mydomain.com' );
# Setup paging actions
new VBTK::Actions::Email::Page ( Name => 'pageMe', To => 'page.me@mydomain.com');
new VBTK::Actions::Email::Page ( Name => 'pageBob', To => 'page.bob@mydomain.com');
# Setup some action groups
new VBTK::Actions ( Name => 'emailSA', SubActionList => 'emailMe,emailBob' );
new VBTK::Actions ( Name => 'pageSA', SubActionList => 'pageMe,pageBob,emailSA' );
# Initialize a server object.
$server = new VBTK::Server (
ObjectPrefix => 'sfo',
SmtpHost => 'mysmtphost',
MailFrom => 'vbtk@settomydomain.com',
CompanyName => 'My Company',
AdminEmail => 'sysop@settomydomain.com',
);
# Point to another VB server with which we will exchange heartbeats
# and relay requests
$server->addRemoteServer(
RemoteURI => 'http://myotherserver:4712' );
# Create templates to match up status change actions with objects
# Critical objects, page and email
$server->addTemplate (
Pattern => 'nyc.*http|mainserver.*ping',
StatusChangeActions => {
Failed => 'pageSA',
Expired => 'pageSA',
Warning => 'emailSA' } );
# Everything else, just email
$server->addTemplate (
Pattern => '.*',
StatusChangeActions => {
Failed => 'emailSA',
Expired => 'emailSA',
Warning => 'emailSA' } );
# Start the server listening and handling requests.
$server->run;
Product's homepage
Requirements:
· Perl