VBTK::Controller - VBTK Master Controller Package
use VBTK::Controller; # Define some global settings for the controller $obj = new VBTK::Controller ( MasterVBServer => 'myhost1', SlaveVBServers => 'myhost3' ); # Define a host group and which RemoteURI they should report to. $obj->addHostGroup( VBServerURI => "http://myhost1:$::VBPORT", HostList => { myhost1 => 'vbserver,vbcommon', myhost2 => 'vbcommon,vbping,vbhttp', }, ); # Define a host group and which RemoteURI they should report to. $obj->addHostGroup( VBServerURI => "http://myhost3:$::VBPORT", HostList => { myhost3 => 'vbserver,vbcommon', myhost4 => 'vbcommon,vbtcp', }, ); $obj->run;
This package is used to define the MasterVBServer, any SlaveVBServers and which VB monitoring scripts should be run on each host.
The constructor for this class accepts the following parameters which indicate which host is the master VBServer and which hosts are slave VBServers. All config file changes should be made on the master. Changes can then be manually replicated out to the slave servers and then to the clients by using the 'vbc sync' command on those hosts.
This is used to define the hostname where the master VBServer will run. This entry is used only during sync of the slave servers.
A comma-separated list of hosts on which slave VBServer process will be run. When the 'vbc sync' command is run on a host specified in the 'SlaveVBServers' list, the vbc script will ignore the 'VBServerURI' param specified for the host and will instead use the 'VBServerURI' param specified for the host which runs the master VBServer process.
The 'addHostGroup' method is used to define a group of hosts along with the VBServerURI they should sync from and report to. It also defines which monitoring scripts will run on each host.
This is the URI from which config files will be replicated and to which all client processes running in this host group will report statuses. Hosts defined as slave servers will ignore this entry when syncing and will instead use the VBServerURI of the host specified as the master VBServer.
VBServerURI => "http://myhost1:4712",
A pointer to a hash which matches up host names to comma-separated lists of vb scripts. The vb scripts must be names of real perl scripts in the $VBCONF directory.
HostList => { myhost1 => 'vbserver1,vbcommon', myhost2 => 'vbserver2,vbcommon' },
Brent Henry, vbtoolkit@yahoo.com
Copyright (C) 1996-2002 Brent Henry
This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation available at: http://www.gnu.org/copyleft/gpl.html
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
To install VBTK, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VBTK
CPAN shell
perl -MCPAN -e shell install VBTK
For more information on module installation, please visit the detailed CPAN module installation guide.