![]() |
help![]() |
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 BB4 Servers 0.0.0.0 www.bb4.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.bb4.com http://www.bb4.com/bb/bb.html summary bigbrother.dev2 www.bb4.com http://www.bb4.com/bb/bb2.html
Magical keywordsWhen 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:
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
In this manner, hierarchical summaries may be created. The format of the summary command is:
Testing network servicesNext, 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 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 ~. This modifier reverses
the setting of the
IPTEST_2_CLEAR_ON_FAILED_CONN: If it was set to TRUE then it is
set to FALSE for that service and vice-versa.
Stupid bb-hosts file tricksThe 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.
|