The Big Brother Systems and Network Monitor

| help

## Big Brother - the bb-hosts file

BB is controlled almost entirely by the bb-hosts file. It's format was based on the /etc/hosts file, with modifications. A sample BB hosts file:
    #
    # SAMPLE bb-hosts file.
    #
    group-compress MacLawran Servers
    0.0.0.0		www.maclawran.com # BBPAGER BBNET BBDISPLAY ftp dns smtp pop3
    192.168.17.80	bobo.root.sh # ftp smtp pop3 http://bobo.root.sh/ dns
    192.168.17.80	bobo.login.sh # ftp smtp pop3 http://bobo.login.sh/ dns !nntp
    page mario Mario's Universe
    192.168.17.6	iti-s01.iti.qc.com # ftp pop3 http://www.iti.qc.com/
    192.168.17.7	ns.iti.qc.com # ftp pop3 http://www.iti.qc.com/ dns smtp
    192.168.17.61	pvignaud.iti.qc.com # dialup
    #
    summary bigbrother.dev1 www.maclawran.com http://www.maclawran.com/bb/bb.html
    summary bigbrother.dev2 www.maclawran.com http://www.maclawran.com/bb/bb2.html
### Magical keywords When BB starts up, the first thing that happens is that each machine looks for itself in the bb-hosts file (using the uname -n call). Once it has found its line in the bb-hosts file, it knows what it has to do. The roles are: BBDISPLAY - this machine receives incoming status reports and generates the bb.html and bb2.html web pages. The may be more than one BBDISPLAY if you want redundancy. BBDISPLAY machines run the bbd daemon to collect reports, and run the web/mkbb.sh scripts to generate the web pages bb.html and bb2.html. BBPAGER - this machine receives requests to notify admins and processes them. There may be more than one BBPAGER as well, for redundancy. Of course, you'll be notified more than once per problem. BBPAGER machines likewise run the bbd daemon so they can receive pager requests which then calls bb-page.sh. BBNET - this machine performs all network tests for each protocol, for each system listed in the bb-hosts file. Not all protocols are supported. The bb-hosts file also controls the display format of the web pages. This is done using the keywords page and group. The page keyword creates a new display subpage. The format of the page keyword is:
    page	page-name	Whatever you'd like the page title to be
group and group-compress The group keyword starts a new table on the display. Group-compress only displays the columns that have data. The format of the keyword is:
    group	group-name	Whatever you'd like the group title to be
The titles given to the tables or pages in the above commands may contain HTML to change their appearance. Similarly, the MKBBROWFONT and MKBBCOLFONT variables in etc/bbinc.sh can also be adjusted to change the look of the output. summary The summary keyword allows you to send a summary of the current display to another remote instance of Big Brother. The current overall status of this BBDISPLAY will appear as a dot of the same color. The user of the remote BBDISPLAY will be able to click on that dot, and will be brought to this instance of Big Brother. In this manner, hierarchical summaries may be created. The format of the summary command is:
    summary bigbrother.dev1 www.maclawran.ca http://www.maclawran.ca/bb/bb.html
       |         |       |          |                      + URL of this BBDISPLAY
       |         |       |          + machine or IP address to send info to
       |         |       + column name
       |         + row name
       + keyword
### Testing network services Next, network services to be tested can be listed on the line. BB can check any simple TCP-based protocol (using bbnet) and has native support for the following protocols:
    http dns ssh telnet nntp ftp pop smtp imap
If the protocol is simple, it may be added just be editing the bb-network.sh script and adding it to the list of "known" protocols. However, support for more complex protocols is best added as an 'ext' (external) script. Note that protocols must not only exist in bb-network.sh but in the /etc/services file, and their spelling must match. The pop3 service is sometimes listed as pop-3 in the /etc/services file... this causes great confusion and pain. If you need support for a particular protocol, hit the BB mailing list ot the FTP site, it may already be available. A service may be prefixed with ! to indicate it shouldn't be running. This option is especially useful on secure networks to make sure certain protocols aren't left open accidentally, i.e. !telnet Similarly, a service can be prefixed with ~ to reverse the results of the test, i.e. red becomes green..., i.e. ~telnet. The two can then be combined, usually with the dialup keyword to make a green dot appear when a service is not running on a dialup line, i.e. ~!nntp. Listen, I don't even understand that one. Talk to Rob. ### Stupid bb-hosts file tricks The bb-hosts file can do all sorts of magical things that it shouldn't really be able to do. DHCP support via 0.0.0.0 BB supports DHCP addressing. Just put 0.0.0.0 in the IP address field, and the name will be used for testing. arbitrary names for display via testip There are devices out there without any DNS entries, likewise there are situations where admins wish their devices to remain anonymous. For these situations, you can use a bogus name provided the IP address is valid, and the testip keyword is listed on the bb-hosts line. dialup devices BB supports dialup devices using the dialup keyword. This essentially says it's OK for a given device to be unavailable, and the tests will return a clear dot instead of a red dot, and won't page.

###### Copyright © 1997-2000 The MacLawran Group Inc - All Rights Reserved