Note. Tests performed by the Big Brother client (cpu, procs, msgs, disk, mem, and svcs) are not entered in the bb-hosts file. Do not enter directives for these tests.
As described in Defining Hosts on the Server, as part of the definition of a host in the etc/bb-hosts file, you can include directives for the network tests you want. (If there are no test directives, Big Brother will only ping the host and display the results in the conn column--you can disable this test if desired, as described in the note below.) These tests will be performed by the host defined as the BBNET server. Basic TCP-based protocol tests have native support; you can easily add other TCP-based protocols.
Big Brother has native support for these TCP-based protocols:
http ssh ssh1 ssh2 telnet ftp pop pop2 pop3 smtp imap
If the protocol is text-based and simple, just specify it on the host line. The name of the TCP service must be valid and resolvable: the port ID and the service name must be defined in the services file (/etc/services).
To be tested, protocols must be listed both in the BBNETSVCS variable in the bbdef-server.sh and in the network services file (or equivalent), and their spelling must match. The pop3 service is sometimes listed as pop-3 in the services file, and imap may be listed as imap2, especially on AIX; in either case, make sure the service is listed the same way in bbdef-server.sh. The services file is a configuration file that is part of your operating system. You can also test protocols that are not defined in the services file as described below.
You can add either of two prefixes to a network test directive to change its operation:
Add a ! to indicate the service should not be running. This option is especially useful on secure networks to make sure certain protocols are not left open accidentally. For example, !telnet.
Add a ? to specify that the service is a dialup service. If the test fails it should generate a clear status, not a red status, to indicate that the service is offline. For example: ?ftp.
You can only use the ! and ? prefixes with the basic TCP service tests. The http and dns/dig tests cannot use these prefixes.
For the HTTP test, you include the URL to test after the directive. For example:
http://www-path
This tests the host for HTTP connections using the www-path. You can specify multiple URLs either by joining them with |:
http://www-path|http://www-path1
Or by specifying them individually:
http://www-path http://www-path1
If the Web server does not use port 80, you must include the port number at the appropriate place in the path.
You can also test secure HTTPS connections:
https://www_path
The HTTPS test uses the command defined in the LYNX statement in bbdef-server.sh. This is generally either lynx or curl. Either of these programs must be SSL-enabled to be used.
For any network service directive, you can add these qualifiers after the directive:
:s — Silent mode. Big Brother connects to the service port but does not establish a protocol conversation.
:q — Quiet mode. Big Brother runs the regular network test but returns only the result of the test, not the protocol conversation. (This qualifier does not currently work on Big Brother Windows servers.)
:Q — Do not return error messages usually returned by the bbnet program.
To add your own protocol to test (one that isn't listed in the network services file), just add the directive name followed by the port number to test on:
123.123.123.123 some.host.com # newtest:1234
This creates a test called newtest which tests on port 1234. You must also add newtest to the BBNETSVCS variable in the bbdef-server.sh file. You can use the :s qualifier with the new test; if the service is not text-based, you must use :s.
Tip. If you need to send a special command to the service daemon for the new test, add a case statement in bin/bb-network.sh like the one for the imap test. Change the textmsg variable in bb-network.sh to the text to be sent to the daemon.
You can also add these directives for any host:
dns — Check for the name resolution server.
dig — Same check as dns but using the dig command if it is available.
noping — Do not do the ping test for this host.
noconn — Do not do the ping test for this host and don't generate a clear dot.
dialup — If the host is unreachable, display it with a clear button instead of a red button
Big Brother supports DHCP addressing. For hosts which use DHCP, put 0.0.0.0 in the IP address field, and the hostname will be used for testing.
By default, Big Brother uses DNS to make sure the IP address corresponds to the host name entered. You can add the testip directive to a host definition to force Big Brother to use the IP address for that host, not the host name. If the IP address is entered as 0.0.0.0 (for DHCP), Big Brother uses the hostname regardless of testip.
If you monitor a great many hosts and the network tests are taking a long time to complete, you may be able to speed them up by setting the BBNETTHREADS variable in etc/bbdef-server.sh on the BBNET host. By default, this value is 1; raising it causes the BBNET server to run multiple instances of bb-network.sh, testing more than one host at a time. This speeds up the tests, but also uses more resources on the BBNET server. You may also want to use multiple BBNET servers.
Note. In some cases, you may want to disable the connectivity test because you don't need it or because you want to use an external script to test connectivity. You can do this by setting the CONNTEST variable in etc/bbdef-server.sh, on the BBNET host, to FALSE. When you disable the connectivity test, you lose the ability to generate clear conditions for the other network tests because you will not have access to the connectivity status for that host.