BigBrother::Object - Perl extension for common functionality in BigBrother monitoring scripts.
use BigBrother::Object;
my $bb = new BigBrother::Object(); $bb->send_to_bbout($filename,$message); $bb->send_to_bbdisplay($testname,$color,$status); $bb->send_to_bbpager($status);
This module was designed to provide an object-oriented methodology for using PERL scripts within the BigBrother System and Network-based monitoring system. Currently it works only with the UNIX version, but it should work with cygwin. It is loosely based upon BigBrother.pm by Joe Bryant, his module is available at http://www.deadcat.net/1/BigBrother.pm.
During installation, configure.pl should be run. This will create the file Config.pm from the bbdef.sh, bbinc.sh, and bbsys.sh files. The configure script can and should be run again should you update any of these settings.The module provides easy access to the BB configuration values and the bb-hosts file values. It also provides methods for sending status reports and pages through the bb binary itself as well as debug output to the standard BBOUT filehandle.
BigBrother (http://www.bb4.com/) is owned by BB4 Technologies, a part of Quest Software. While this software is meant to compliment the tool, it was not developed in cooperation with BB4 Technologies, and BB4 Technologies has no responsibility for it workings.
For reference, the module was developed against the UNIX Server version 1.9c.
Create a BigBrother object. This method reads in the Config.pm and returns the object. If the Config load fails, it returns the Error Message instead of the object.
Arguements: none.
Returns: BigBrother Object.
Gets a hash of the BigBrother config variables.
Arguements: key for the variable wanted or none.
Returns: If a key is passed the result is the value paired with that key, else a hash reference containing the BigBrother definitions.
Gets a text file contents.
Arguements: System name of the filename.
Returns: The contents of the file in list or scalar context.
Append data to a filehandle defined as BBOUT in the BB environment variables.
Arguements: Name of the running script; Text to print out.
Returns: Error message if failed.
Send status data to BBDISPLAY as defined in the BB environment variables.
Arguements: Name of the running test; Color code of the message; Status to print out.
Returns: Error code if failed.
Send status data to BBPAGER as defined in the BB environment variables. The method checks the DFPAGE variable to ensure pages are used.
Arguements: Status to send to pager.
Retrieves the IP Address for a given hostname within the BBHOSTS file.
Arguements: Hostname of bb-hosts server.
Returns: IP Address for bb-hosts server or undef if server does not exist.
Retrieves a list of the services for a given hostname within the BBHOSTS file.
Returns: A reference to the list of services for bb-hosts server or undef if server does not exist.
Retrieves the hostname for a given host IP within the BBHOSTS file.
Arguements: IP Address of bb-hosts server.
Returns: The hostname for the bb-hosts server or undef if server does not exist.
Don Shanks, <perldev@bpss.net>
perl.
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install BigBrother::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm BigBrother::Object
CPAN shell
perl -MCPAN -e shell install BigBrother::Object
For more information on module installation, please visit the detailed CPAN module installation guide.