Creating External Scripts

External scripts run on either the Big Brother server or client and send information back to the server. To be usable by Big Brother, a script must have two characteristics:

Note. This topic describes creating external scripts on a UNIX host. Creating scripts on a Windows client host is described in the Windows client help file.

To add your own tests, first create the script itself. It may be easiest to start with the template available in the ext/ext-proto file and add your code. When writing the script, remember:

Once the script is complete, we recommend you place it in $BBHOME/ext and test it before adding it to Big Brother. To test the script:

cd /home/bb
BBHOME=/home/bb
export BBHOME
. ./etc/bbdef.sh
cd ext
./yourexternaltest

Look for errors, fix them, and rerun your test until you are satisfied.  

To have Big Brother run the script, you need to add it to the etc/bb-bbexttab file. This file defines all scripts to run for each host. Copy the etc/bb-bbexttab.DIST file to etc/bb-bbexttab and make your changes. The format of each line is:

host : options : scripts

Host is the name of the host where the scripts will run. You must copy bb-bbexttab to each host where you want to run external scripts.

Options is not yet implemented; be sure to enter two colons (: :) after the host and before the script names.

Scripts are the scripts to run on this host, separated by spaces. Each script must exist in the $BBHOME/ext directory on the host.

Tip. Since the script names are separated by spaces, there cannot be any spaces in the command you use to start the script. If you need to include arguments for this script, have Big Brother run a script without arguments which in turn runs the script with arguments.

You can set the frequency of any script by specifying the interval it should run at, in seconds, after the script name, separated by a semi-colon (;).  

Here are two sample etc/bb-bbexttab entries:

www.bobo.com : : script1 script2;3600 script3;900 script4
www.baba.com : : script2 script5

On www.bobo.com, script1 and script4 will run every  five minutes (the default), while script2 and script3 will run every 60 and 15 minutes respectively.  On www.baba.com, script2 and script5 will run every five minutes. Both bb-bbexttab and the appropriate scripts must exist on www.bobo.com and www.baba.com.

After updating bb-bbexttab, you must restart Big Brother for it to start running the scripts.

Finally, you must add the test name and a numeric code for it in the svcerrlist token in the etc/bbwarnsetup.cfg file on the BBPAGER host. If you do not, any notifications for the external script will show the code 999.

Note. Some community-produced scripts are available on www.deadcat.net. In most cases, these scripts contain a readme file that tells you how to install and configure them. These scripts are not supported by Quest Software.