The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

BigBrother::Object - Perl extension for common functionality in BigBrother monitoring scripts.

SYNOPSIS

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);

DESCRIPTION

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.

METHODS

new()

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.

get_bbenv()

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.

get_file()

Gets a text file contents.

    Arguements: System name of the filename.

    Returns: The contents of the file in list or scalar context.

send_to_bbout()

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_to_bbdisplay()

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_to_bbpager()

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.

    Returns: Error code if failed.

get_bbhost_ip()

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.

get_bbhost_svcs()

Retrieves a list of the services for a given hostname within the BBHOSTS file.

    Arguements: Hostname of bb-hosts server.

    Returns: A reference to the list of services for bb-hosts server or undef if server does not exist.

get_bbhost_name()

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.

AUTHOR

Don Shanks, <perldev@bpss.net>

SEE ALSO

perl.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 47:

'=item' outside of any '=over'

Around line 331:

You forgot a '=back' before '=head1'