Big Brother - Adding extensions

"External commands", "extensions" and "plug-ins" are all terms used to describe a custom test for Big Brother. Extensions are usually executed by BBClients and there are two ways to add an external command to BBPE, the UNIX/Linux way and the Windows way.

Two steps to understanding extensions:

1. Extensions can be written in any language; UNIX/Linux extensions are mostly written in shell or Perl, and, Windows extensions are mostly written in VBScript or batch files.

2. Big Brother clients have a binary named "bb", or, "bb.exe" in the bin directory that's used to send messages to a BB management server.

So, an extension is an executable script that runs a test and reports the results of that test to a BB management server by using the bb, or, bb.exe method.

The bb method has the following syntax:

bb bbserver.domain.com "status bbserver.domain.com.test red The test has failed"

The Breakdown:
  • bb
  • The binary method for sending a status message to a BB management server.
  • bbserver.domain.com
  • The name of a BB management server.
    "Things between the double quotes"
  • status
  • BB keyword that tells the BB Server a status message is coming.
  • bbserver.domain.com.test
  • The device name dot test name.
  • red
  • The status color of the test (red, green, yellow, clear, blue or purple).
  • The test has failed
  • Anything after the status color will be text displayed in the status report on the BBDISPLAY.

    To add your own custom test to Big Brother...

    ***** The UNIX/Linux way *****


    On UNIXLinux BBClients, the configuration file for extensions is the BBClient/etc/bb-bbexttab file. This file is fully commented with instructions and examples for adding external commands. Here's the file:

    # bb-bbexttab: configuration file for launching external scripts
    #
    # Format:
    #
    # host: misc settings : external scripts list
    # localhost: misc settings : external scripts list
    # : misc settings : external scripts list
    #
    # host can be FQDN (fully qualified domain name) or
    # just a plain hostname but it is preferred that you
    # use a FQDN.
    # localhost: using this specifies that the scripts
    # specified on the line are to be launched on all clients
    #
    # The same host can be specified on multiple lines to aid readability
    #
    # Misc settings field is unimplemented ...
    # For future use...
    #
    # You can override the default sleep between cycles
    # by addding a time qualifier to the script:
    # e.g.: localhost: script1;600
    # **NOTE** The sleep delimiter in BBEXT of bbdef.sh was
    # ':' (script1:600) but here it is ';'
    # in order to keep the same format as the
    # other bb-*tab files (the : is used to delimit
    # file entry fields in all bb-*tab files) .
    # The time qualifier is specified in SECONDS
    #

    #: : cont
    #localhost: : script2;600
    #localhost : : script3
    #www.bobo.com : : script4 script5
    #www: : script6

    : : bbcd bb-memory.sh bbmrtg.sh bb-ntp.sh

    Every line that begins with a pound sign (#) is a comment, so, there's only one line that counts in this example. The configuration is colon delimited and has three fields.

    : : bbcd bb-memory.sh bbmrtg.sh bb-ntp.sh

    1. The first field (left side of the first colon) is for specifying the hostname of the BBClient that will execute the extensions defined in the third field. If the hostname is blank the list of external commands in the third field will be executed by every BBClient that has this file.

    2. The second field is a miscellaneous field and should not be used.

    3. The third field is a space delimited list of external commands that this BBClient will execute. The listed commands must exist in the BBClient/ext directory and must be executable by the BB software owner.

    NOTE: After adding an extension to this file you must restart the BBClient software. The STDOUT of the BBClient restart will display a list of external commands that this BBClient will execute.

    ***** The Windows way *****


    1. Save the script in the BBClient ext directory (DEFAULT: C:\Program Files\Quest Software\Big Brother\BBNT\ext).

    2. Add the script to the BBClient configuration editor (GUI), to do this:
    2a. Launch the BBClient configuration editor.
    (Start -> Programs -> Quest Software -> Big Brother -> Client -> Configure)



    2b. Click the "Save Log Location" button in the middle of the GUI. When the dialog in the image below opens up, navigate to the BBClient\logs directory and click OK.



    2c. Click the "Add External" button and navigate to the BBNT\ext directory (where you saved the script) and select the CPUTemp.vbs script.



    2d. After selecting the script, click the "Open" button.



    2e. Then Click the "Save", "Stop" and Start buttons on the configuration editor.


    VBScript extensions .vbs

    Many Windows extensions are written in VBScript and by default Microsoft operating systems open a VBScript file with the WScript interpreter, which causes a dialog window to pop up whenever STDOUT is called in the script. To avoid the pop ups, configure the system to use the CScript interpreter:

  • Launch Windows Explorer, click on "Tools" and select "Folder Options".


  • Click the "File Types" tab.
  • Click the "Advanced" button.
  • Highlight the "Open" Action.
  • Click the "Edit" button.
  • Replace "WScript" with "CScript" as the Action.
  • OK, OK, OK, OK...



    That's it, shortly after performing the above you'll see a new column on the BBDISPLAY for the cpu temp test. You can drill down into that test status icon and see the temperature of your CPUs...