Transcript
Page 1: Big Brother Installation and Configuration Guide

Big Brother Installation and Configuration Guide

This guide has been written by Cook IT Services.  It will show you how to get Big Brotherinstalled and operating on a Solaris server.  If you would like a customised version of thisguide (different platform/etc) contact us as at:

http://www.cookitservices.com

Copyright 2005Guide Version 2.0

We provide Big Brother consulting services.

1. Introduction...........................................................................................................................4Target Audience for this document......................................................................................4Why is use Big Brother?.......................................................................................................4What about using a “commercial” enterprise monitoring product?.....................................4What does it monitor?...........................................................................................................4How are we notified when something goes wrong?.............................................................4What about changing it for our needs?.................................................................................5

2. Some terminology.................................................................................................................53. Installing BIG Brother..........................................................................................................6

3.1 Download the source code..............................................................................................63.2 Decompress the package.................................................................................................63.3 Modify the search path...................................................................................................63.4 Untar the big brother software........................................................................................73.5 Create a big brother group and user to own and run Big Brother..................................73.6 Install the Server Software..............................................................................................7

3.6.1  Step 1......................................................................................................................83.6.2 Step 2.....................................................................................................................123.6.3 Step 3.....................................................................................................................133.6.4 Step 4.....................................................................................................................133.6.5 Step 5.....................................................................................................................133.6.6 Step 6.....................................................................................................................143.6.7 Step 7.....................................................................................................................143.6.8 Step 8.....................................................................................................................143.6.9 Step 9.....................................................................................................................143.6.10 Step 10.................................................................................................................143.6.11 Step 11.................................................................................................................15

Page 2: Big Brother Installation and Configuration Guide

3.7 Install the Client Software........................................................................................164. Configuring Big Brother.....................................................................................................19

4.1 Download the latest BBConfig package from http://www.deadcat.net........................194.2 Configure keywords to look for in the messages file...................................................244.3 Customise Disk Free checks.........................................................................................244.4 Configure who is notified with messages.....................................................................254.5 Update the description seen on the front page..............................................................264.6 Start up the server.........................................................................................................264.7 Generic Instructions To Configure Extension Scripts..................................................274.8 Extension Scripts..........................................................................................................28

5. Install Client Software on new Target Server.....................................................................28Add the entry to BBConfig.................................................................................................29Regenerate the bb configuration files.................................................................................29Generate client tar ball (ready to transfer to the client server)...........................................29Transfer client tar file to new server...................................................................................29Login to the destination client............................................................................................29Create a big brother group and user to own and run Big Brother......................................29Move tar file into the bbc directory....................................................................................29Go to bb client dir...............................................................................................................29Extract the client files.........................................................................................................30Make the client automatically start on boot........................................................................30

Now to make it start automatically….............................................................................31Start the client.....................................................................................................................31Check for errors..................................................................................................................31

6. Tips.....................................................................................................................................32Big Brother Documentation....................................................................................................32How to Acknowledging alerts................................................................................................32SMS setup for big brother (on Solaris)...................................................................................32Configuring Solaris for high­speed dial out...........................................................................34

1. Configure your serial port for dial out............................................................................342. Test communication with the modem.............................................................................353. Set the modem DTE speed.............................................................................................364. Test high­speed communication with the modem..........................................................375. Check permissions and ownership of the device files....................................................396. Dial a remote system......................................................................................................39

Configure Big Brother to send SMS messages.......................................................................40GNU tar Installation...............................................................................................................41Perl Installation.......................................................................................................................41RRD Installation.....................................................................................................................44

Why use RRD?...................................................................................................................45

Page 3: Big Brother Installation and Configuration Guide

LARRD Installation................................................................................................................45Why use LARRD?..............................................................................................................45

To activate LARRD trending on a Big Brother Client...........................................................48MRTG installation..................................................................................................................48

Why use MRTG?................................................................................................................48Install zlib first................................................................................................................49Install jpeg libraries........................................................................................................49Installing libpng..............................................................................................................49Installing GD..................................................................................................................50Install MRTG..................................................................................................................50

Configure bbmrtg.pl...........................................................................................................51Why use bbmrtg.pl?........................................................................................................51

Configure mrtg­rrd.cgi........................................................................................................52Why use mrtg­rrd.cgil?...................................................................................................52

Add a device for mrtg to monitor.......................................................................................53Configure MRTG to run from cron....................................................................................53

BigBrother.pm Installation.....................................................................................................54Why use BigBrother.pm?...................................................................................................54

FPING Installation..................................................................................................................54Why use FPING?................................................................................................................54Install the FPING binary.....................................................................................................54Install fping.pl.....................................................................................................................55Disable Big Brother server from performing pings............................................................55

Configure SNMP integration..................................................................................................56Why use SNMP?.................................................................................................................56Install openssl (if not already installed)..............................................................................56Ensure SNMP is not currently running...............................................................................56NET­SNMP Installation.....................................................................................................57Install the NET­SNMP Perl Modules.................................................................................58Test a SNMP device...........................................................................................................58Install the CPAN Perl Modules..........................................................................................58

Install bb­xsnmp.....................................................................................................................59

Page 4: Big Brother Installation and Configuration Guide

1. Introduction

Big Brother is designed to let anyone ­ from omniscient Sys Admins, to Pointy­HeadedBosses, see how the network is doing in near real­time, from any web browser, anywhere. 

Big Brother displays status information as web pages or WML pages for WAP­enableddevices. These web pages have the systems monitored down the left hand side of the page,the tests for each system across the top of the page. This results in a matrix of colour codeddots on screen. Green is Good, Red is Bad. In addition, the background colour of the statuspages is always the colour of the most serious condition of any element being monitored atthat time.

Target Audience for this documentA junior systems administrator with some knowledge of UNIX.  This Guide should containenough detail to get an enterprise monitoring solution installed at your site.  Start smallthough until you fully understand how everything works.  e.g. one server and one client.

Why is use Big Brother?It is cheap and it works!  As long as you do not charge for the monitoring service, you donot require a commercial license.  Problems are usually known before any customers contactyou.  Sometimes problems are fixed before the customer even knows something wentwrong!

What about using a “commercial” enterprise monitoring product?It is expensive!  It may or may not monitor everything you need, but cost is a major factor.Extra hardware and training will be required.  You will probably need many permanent staffjust to manage it.

Big Brother can be installed and running before you even start evaluating the large scalecommercial equivalents.

What does it monitor?Sun Solaris, almost any UNIX variant (Linux,etc), NT, Novell, VMS, and any device thatcan use SNMP (e.g. Cisco Equipment, Nokia Firewalls, Cacheflow Proxies, etc)

How are we notified when something goes wrong?Email, pager and also SMS ­ it sends messages to mobile phones.

Page 5: Big Brother Installation and Configuration Guide

What about changing it for our needs?The source code is included, so you can change whatever we like.  If there are extra teststhat you want performed, simply write the code yourself using UNIX shell script, perl, java,whatever  (or contact http://www.cookitservices.com for help).  There is a web site hostingextra tests people have written and share with the world.  (http://www.deadcat.net).

Big Brother itself is mainly written in UNIX shell script, with some parts written in C forspeed.

For detailed information look at:http://ww.bb4.com http://ww.bb4.org

Note: A web server is required to view big brother output.  i.e. Install Apache

A working C compiler is also required.  i.e. Install gcc  ( For Solaris get a ready toinstall version from http://www.sunfreeware.com)

Conventions used in this guide:

Where you see an instruction showing this prompt “#” it indicates you should execute theinstruction as the root user.  Where you see this prompt “$” it indicates you should executethe command as the big brother user.

2. Some terminology

BBDISPLAY is the server that receives the updates from the big brother clients.  This iswhere you point your web browser to quickly see the state of your servers.

BBNET is the server that will perform network tests.  e.g. DNS,SMTP,IMAP,etc.    Thisguides assumes your main BBDISPLAY server will also function as a network testingserver.

BBPAGER is the server that will send alerts.  This guides assumes your main BBDISPLAYserver will also function as a paging server.

Page 6: Big Brother Installation and Configuration Guide

BBCLIENT.  Machine that has the big brother tools/agent running on it.  For Big Brother1.9e your BBDISPLAY server will usually also be a BBCLIENT server.  By default, theclient software is not automatically installed when you install the server software.

3. Installing BIG Brother

3.1 Download the source codeNote: There are currently two versions of Big Brother.  The professional version and “betterthan free (btf)”.  The professional version does not contain source code and requires acommercial license for use, the btf version contains the source code and does not require acommercial license for most companies.  See http://ww.bb4.com and http://ww.bb.org formore information.

This guide is for the “better than free” version,

The source code is available from http://www.bb4.org/. At the time of writing, the latestversion for UNIX is 

  v1.9e

Download this file into a temporary directory, such as /usr/local

3.2 Decompress the packageTo decompress the downloaded package file:

# cd /usr/local# gunzip bb*

This replaces the downloaded file with the decompressed file

bb­1.9e.tar

3.3 Modify the search pathIf you haven't already done so for other software, you now need to modify the search pathsso that the system can find the program and its manual pages.  This is done by editing thefile ~/.profile and adding the following lines (if they aren't already there) to the end:

PATH=/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:$PATH

Page 7: Big Brother Installation and Configuration Guide

MANPATH=$MANPATH:/usr/man/:/usr/local/manLD_LIBRARY_PATH=/lib:/usr/lib:/usr/openwin/lib:/usr/local/ssl/lib:/usr/local/lib

export PATH MANPATH LD_LIBRARY_PATH

It's advisable to log out and log in again at this point to activate these changes. 

3.4 Untar the big brother softwareInstalling the package is simply a matter of issuing the following commands:# cd /usr/local# tar xvf ./bb­1.9e.tar

This creates 3 files BB.README.FIRST, BBSVR­bb1.9e­btf.tar, and BBCLT­bbc1.9e­btf.tar.  Readthe README!!

# tar xvf ./BBSVR­bb1.9e­btf.tar

3.5 Create a big brother group and user to own and run Big Brother

Note: follow your site guidelines on user and group creation.  The following is anexample only

#groupadd ­g 1984 bbgroup#useradd ­u 1984 ­g 1984 ­d /usr/local/bb bbuser­s /bin/ksh

3.6 Install the Server Software

Note: Following section was taken directly fromREADME.INSTALL, with extra comments from us.This section is for installing Big Brother on anew platform, or to install a BBDISPLAY server.

Page 8: Big Brother Installation and Configuration Guide

To install BB on a client see the section laterin this document.

bb1.9e­btf/                referred as $BBHOMEbbvar/acks/                   referred as $BBACKS     /data/                   referred as $BBATA     /disabled/               referred as $BBDISABLED     /hist/                   referred as $BBHIST     /histlogs/               referred as $BBHISTLOGS     /logs/                   referred as $BBLOGS

3.6.1  Step 1

        Rename the default installation dir.  We will change it back later.        mv bb1.9e­btf bb        cd bb        This directory is often referred as BBHOME or $BBHOME        cd ./install        ./bbconfig <OS­NAME>        where OS­NAME is  bsdi sco3 sco freebsd solaris hpux9 hpux                                linux sunos netbsd osf ultrix irix                                unixware redhat aix dynix debian dgux                                caldera mandrake        Note that <OS­NAME> is optional, BB will try to figure it out.                If you are running Linux you may have to provide the proper                distribution name:

                ./bbconfig redhat                ./bbconfig debian                ./bbconfig caldera                ./bbconfig mandrake                ./bbconfig linux

        ./bbconfig will ask you questions about your setup        be ready with:                If the old­style structure be kept                If you intend to use FQDN(Fully qualified domain names)

Page 9: Big Brother Installation and Configuration Guide

                Which host(s) is(are) the BBDISPLAY(s)                Which host(s) is(are) the BBPAGER(s)                If the current host is a BBDISPLAY/BBPAGER                Default e­mail recipient for notification                URL you intend to view BB with                URL of the BB CGI scripts                The user id of your web servere.g.PLEASE READ THIS SOFTWARE LICENSE AGREEMENT (THE "AGREEMENT")CAREFULLY. BY DOWNLOADING, INSTALLING, COPYING OR USING THE BIGBROTHER SOFTWARE (THE "PRODUCT"), YOU INDICATE ACCEPTANCE OF ANDAGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT.  IF YOU DO NOTAGREE TO THESE TERMS AND CONDITIONS, DO NOT INSTALL OR USE THE PRODUCT.

[snip]

Do you agree to the terms of this license (y/n): y

Welcome to the Big Brother installation procedure...Please confirm your OS: [solaris]:---> We'll configure for solaris...

Big Brother needs it's own user id. If your BB userdoesn't exist, you'll have to create it then re-run bbconfig.

What will be the user ID for BB [bb]: bbuser---> BB will only run from user 'bbuser'

Making sure BBHOME </usr/local/bb> is writable...

---> OK, /usr/local/bb is fine...

When you set up your machines, you should use FullyQualified Domain names, this means you use the whole name, likewww.bb4.com, instead of just 'www'. This is recommended.

Use FQDN (y/n): [y] y---> Good, we'll use FQDN

Page 10: Big Brother Installation and Configuration Guide

Big Brother creates HTML pages with the status ofyour network. You'll need a web server to publish this information.

What host will be the BBDISPLAY [bbserver.mydomain.com]:

---> OK... bbserver.mydomain.com will be a BBDISPLAY

Big Brother sends important messages to a pagerserver. This machine will at a minimum to be able to send mail.

What host will be the BBPAGER [bbserver.mydomain.com]:

Some questions regarding the current host (bbserver.mydomain.com) will be asked.

Is this host a BBDISPLAY host (y/n): [y]

Is this host a BBPAGER host (y/n): [y]

Enter the default recipient: [[email protected]]

Since Big Brother produces results to be displayed onweb pages, we need to know where to view these results.

Enter the base URL for BB [/bb]:---> OK... Big Brother will live under http://bbserver.mydomain.com/bb

Big Brother also uses CGI scripts to create dynamicoutput. What directory do these scripts live in?

Enter CGI directory [/home/www/httpd/cgi-bin]: /usr/local/apache2/cgi-bin---> OK... CGI scripts will live at /usr/local/apache2/cgi-binEnter the base URL of the CGI scripts [/cgi-bin]:---> OK... The base URL location of CGI scripts is in /cgi-bin

--------------------------------------------------------

--> UPDATING Makefile--> UPDATING runbb.sh--> UPDATING bbsys.local

Page 11: Big Brother Installation and Configuration Guide

--> CHECKING COMMAND PATHNAMES*** Verifying pathnames to necessary commands...DIG is unavailable, the directive "dig" cannot be used in bb-hosts

You are missing these commands:DIG*** Done.--> UPDATING bbdef.sh--> UPDATING URL location--> INSTALLING CGI scripts

BB needs to set the group name of the www/repdirectory to the group name of the web server by using its username

Enter web server user id [nobody]: apache

You may override the group name determined by theprevious step.

Enter group name [nobody]: apache

--> SETTING WRITE PERMISSION FOR OWNER AND GROUP FOR www/rep--> CHANGING THE GROUP ID OF www/rep--> UPDATING pager scripts--> UPDATING pager scripts

--------------------------------------------------------

--------------------------------------------------------

--> Done. Now do chown -R bbuser /usr/local/bbvar /usr/local/bb su - bbuser to continue installation using thatuser ID

Now compile Big Brother

cd /usr/local/bb/src make make install

--------------------------------------------------------

Page 12: Big Brother Installation and Configuration Guide

Change the dir name back to current version# mv /usr/local/bb /usr/local/bb1.9e­btf 

Create a soft link to the bb dir.  This will make upgrading Big Brother easier.# ln ­s /usr/local/bb1.9e­btf /usr/local/bb

This is useful as you don't have to change the directory in your startup script. (see section11)

Add this to .profile for bbuser# vi /usr/local/bb/.profile

PATH=/sbin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/ccs/binMANPATH=$MANPATH:/usr/man/:/usr/local/manLD_LIBRARY_PATH=/lib:/usr/lib:/usr/openwin/lib:/usr/local/ssl/lib:/usr/local/lib

export PATH MANPATH LD_LIBRARY_PATH

      ln ­s /full_path_to_bb/www   /WWW/bb (where /WWW is the Document Root dir).        Make sure the permissions are correct.  Configure your web server        for this directory if need be.

Also make sure that your web server follows symbolic linksNote: use the location of the bb link in step 5)

To check where your Document Root directory is located

# find / ­name httpd.conf# grep Document /full_path_to/httpd.conf

e.g. # ln ­s /usr/local/bb/www  /usr/local/apache2/htdocs/bb

3.6.2 Step 2

Become bbuser

Page 13: Big Brother Installation and Configuration Guide

# su – bbuser

This should put you in the bbuser home dir (/usr/local/bb)

$ cd src$ make$ make install

3.6.3 Step 3

$ cd ../etc

edit bb­hosts, put your hosts names in there.  Refer to install/README.This is the core of Big Brother.  You must read the docs here.edit bbdef.sh, set alarm levels and things.  If you want to usefully qualified domain name hosts then make sure you set FQDN=TRUEin etc/bbdef.sh.  If this is the first host you install and intendto use it as the display/notification server as well as the serverthat test the network services then your bb­hosts should containthis line:

xxx.xxx.xxx.xxx   bbserver.mydomain.com  # BBDISPLAY BBPAGER BBNET

Edit /usr/local/bb/etc/bbdef­server.sh and make the following changes:

BBLOGSTATUS="DYNAMIC"

BBNETTHREADS=5

RUNOPTS="DATAMSG EMBEDHTML"

3.6.4 Step 4./bbchkcfg.shChecks the bbdef.sh/bbinc.sh/bbsys.sh source scripts for invalid entries./bbchkhosts.shChecks the bb­hosts file for errors

3.6.5 Step 5

Page 14: Big Brother Installation and Configuration Guide

3.6.6 Step 6

3.6.7 Step 7

cd /usr/local/bb./runbb.sh start

Examine the BBOUT file for any errors

NB The HTML summary pages (bb.html/bb2.html) should be available2 minutes after the startup.  Don't panic they’ll be there ifyou are patient. In your browser, you should be able tosee the results at http://bbserver.mydomain.com/bb/ orhttp://bbserver.mydomain.com/bb/bb.html  (assuming you used /bb as BB URL root)

3.6.8 Step 8Debug, and look at all the docs.

3.6.9 Step 9Check the online documentation!  It lives under:http://bb4.org/bb/bb­help.html

3.6.10 Step 10This will have enabled you to have a display/pager server set up.At this point no clients are running.  When you have all ofyour hosts defined in etc/bb­hosts thenuse install/bbclient to create a tarball for BB clients of the sameOS/HW type.  If you have different OS/HW platforms thenreinstall BB on each one (then use the bbclient to create a tarballfor each identical OS/HW client) and don't forget to copy your masterbb­hosts file to it. Run through the install procedure to makesure that the clients are also installed properly(bbchkcfg.sh/bbchkhosts.cfg)

(Note: This means you cannot use a “bbclient” on Solaris SPARC and then ftp it to adifferent platform. e.g. it will not work on SCO, Solaris x86, or Tru64.  You mustinstall, compile, and configure the client software for each platform you want tosupport.  You do not, however, need to run a BBDISPLAY server on each differentplatform)

Page 15: Big Brother Installation and Configuration Guide

3.6.11 Step 11If you wish to start BB automatically at startup, create a file called bb and put it in

your /etc/init.d dir:

e.g. For Solaris# vi /etc/init.d/bbPut vi into insert mode (i)Then paste the following script

#!/bin/sh## bb            This shell script takes care of starting and stopping#               Big Brother## description: Big Brother is a system & network monitor#BBHOME=/usr/local/bbBBUSER=bbuser

[ ­f $BBHOME/runbb.sh ] || exit 0

# See how we were called.case "$1" in  start)        # Start daemons.        su ­ $BBUSER ­c "cd $BBHOME;./runbb.sh start"        ;;  stop)        # Stop daemons.        su ­ $BBUSER ­c "cd $BBHOME;./runbb.sh stop"        ;;  status)        status bb        ;;  restart|reload)        $0 stop        $0 start        ;;  *)        echo "Usage: bb {start|stop|restart|reload|status}"

Page 16: Big Brother Installation and Configuration Guide

        exit 1esac

exit 0

#End of Big Brother startup script

Now to make it start automatically…

# ln ­s /etc/init.d/bb /etc/rc2.d/S99bb

# ln ­s /etc/init.d/bb /etc/rc0.d/K01bb

Make the init script executable

# chmod u+x /etc/init.d/bb

3.7 Install the Client Software# cd /usr/local

Extract the client tar file.

# tar xvf ./BBCLT­bbc1.9e­btf.tar

# chown ­R bbuser:bbgroup bbc1.9e­btf

# mv bbc1.9e­btf bbc

# su – bbuser

# cd ../bbc

# cd install

# ./bbconfig

PLEASE READ THIS SOFTWARE LICENSE AGREEMENT (THE "AGREEMENT")

CAREFULLY. BY DOWNLOADING, INSTALLING, COPYING OR USING THE BIG

BROTHER   SOFTWARE   (THE   "PRODUCT"),   YOU   INDICATE   ACCEPTANCE   OFAND

AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT.   IF YOU DONOT

AGREE TO THESE TERMS AND CONDITIONS, DO NOT INSTALL OR USE THEPRODUCT.

[snip]

Page 17: Big Brother Installation and Configuration Guide

Do you agree to the terms of this license (y/n): y

Thank you, installation continuing...

        Welcome to the Big Brother installation procedure.

Please confirm your OS: [solaris]:

­­­> We'll configure for solaris...

        Big Brother needs it's own user id.  If your BB user doesn't exist,

        you'll have to create it then re­run bbconfig.

What will be the user ID for BB [bb]: bbuser

­­­> BB will only run from user 'bbuser'

        Making sure BBHOME </usr/local/bbc> is writable...

­­­> OK, /usr/local/bbc is fine...

        When you set up your machines, you should use Fully Qualified

        Domain names, this means you use the whole name, like www.bb4.com,

        instead of just 'www'.  This is recommended.

Use FQDN (y/n): [y]

­­­> Good, we'll use FQDN

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

Page 18: Big Brother Installation and Configuration Guide

­­> UPDATING runbb.sh

­­> UPDATING bbsys.local

­­> CHECKING COMMAND PATHNAMES

*** Verifying pathnames to necessary commands...

*** Done.

­­> UPDATING bbdef.sh

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

­­> Done.  Now do

                chown ­R bbuser /usr/local/bbc

Now compile Big Brother

                cd /usr/local/bbc/src

                make

                make install

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

# cd ../src

# make

# make install

Rename the directory back to the original name

# mv  /usr/local/bbc /usr/local/bbc1.9e­btf

Page 19: Big Brother Installation and Configuration Guide

Create a soft link to the new client directory.  This will make upgrading Big Brother easier.

# ln ­s /usr/local/bbc1.9e­btf /usr/local/bbc

edit bb­hosts, put your hosts names in there.  Refer to install/README.This is the core of Big Brother.  You must read the docs here.edit bbdef.sh, set alarm levels and things.  If you want to usefully qualified domain name hosts then make sure you set FQDN=TRUEin etc/bbdef.sh.  If this is the first host you install and intendto use it as the display/notification server as well as the serverthat test the network services then your bb­hosts should containthis line:

xxx.xxx.xxx.xxx  this.host.name # BBDISPLAY BBPAGER BBNET

Every client will need an entry in this bb­hosts file.  We will use a tool called BBConfig toedit this file for us.

4. Configuring Big Brother

4.1 Download the latest BBConfig package from http://www.deadcat.net

(BBConfig does a lot of the hard work of editing multiple bb files to configure it.  Youcould also edit the various bb­*tab files and bb­hosts yourself, but it will be more errorprone)

Place the file in /usr/locale.g. # cp BBConfig­1.9.tar.gz /usr/local

Installing the package is simply a matter of issuing the following commands:# cd /usr/local# gunzip BBConfig*# tar xvf ./BBConfig*.tar# cd BBConfig­1_9# perl install ­bbhome /usr/local/bb

Page 20: Big Brother Installation and Configuration Guide

*** Read the BBConfig.README file. ****

Sample bb­config (configuration files forBBConfig)

# Uncomment the following lines if you want to turn on# the generation of $BBHOME/etc/security.#objectclass: bigbrothersecurity: off

#-----------------------------------------# Templates#-----------------------------------------

# Sample template for Solaris#objectclass: templatename: solarisservices: dns ftpprocpanic: inetd syslogd /usr/sbin/cron sshdext: bb-top.sh network2.sh bb-cpu2.sh bb-prtdiag.sh bb-iostat.sh bb-ntp.sh bf-larrd.shcpu: 500:600msg: /var/adm/messages: : atal ; anic ; rror;ERROR ; OFFLINE ; half-duplex ; ailing ; transport failed ;disk not responding ; NOTICE ; WARNING ; repeated : ntpdate ;xntpd ; core : forceload

objectclass: templatename: NTServer

objectclass: templatename: dnsservices: dns

objectclass: templatename: ciscoservices: snmp

objectclass: templatename: cacheflow_pxyservices: snmpsnmp: public cacheflow_cpu

Page 21: Big Brother Installation and Configuration Guide

#-----------------------------------------# Hosts#-----------------------------------------

################################################# Unix Servers################################################host: bbserver.mydomain.comip: 0.0.0.0template: solaristemplate: veritasbbservices: BBDISPLAY BBNET BBPAGERbbset: UnixServersprocpanic: /usr/local/apache2/bin/httpd;<=2ext_add: larrd/larrd.pl bf-larrd.sh bbmrtg.pl

host: solaris1.mydomain.comip: 10.10.0.4template: solaristemplate: veritasbbset: UnixServersext: netbackup.shdisk: /:96:98

################################################# DNS Servers################################################

host: dns1.mydomain.comip: 10.10.0.5template: dnsbbset: DNS

host: dns2.mydomain.comip: 10.10.0.6template: dnsbbset: DNS

################################################# NT Servers################################################

host: ntserver1.mydomain.comip: 10.10.0.7template: NTServerbbset: NTServers

################################################

Page 22: Big Brother Installation and Configuration Guide

# Cisco################################################

host: ciscorouter1.mydomain.comip: 10.10.0.1template: ciscobbset: cisco_router

################################################# Proxy Servers################################################

host: proxy1.mydomain.comip: 10.10.0.8template: cacheflow_pxybbset: cacheflow_proxyservices: snmp

Sample bb­disp

page cisco Cisco Equipmentgroup-compress Cisco Routers<bbset cisco_router>

page solaris Solaris Equipmentgroup-compress Unix Servers<bbset UnixServers>

page dns Domain Name Serversgroup-compress DNS Servers<bbset DNS>

page NT NT Serversgroup-compress NT Servers<bbset NTServers>

page proxys Proxysgroup-compress Cacheflow Proxy Servers<bbset cacheflow_proxy>

Produces a Hosts File

Sample hosts file (/usr/local/bb/etc/bb­hosts)

Page 23: Big Brother Installation and Configuration Guide

## THE BIG BROTHER HOSTS FILE## THIS FILE SHOULD BE THE SAME ON ALL SYSTEMSRUNNING BIG BROTHER# CHANGE THIS FILE TO REFLECT YOUR ENVIRONMENT!#page cisco Cisco Equipmentgroup-compress Cisco Routers

10.10.0.1   ciscorouter1.mydomain.com # snmp

page solaris Solaris Equipmentgroup­compress Unix Servers0.0.0.0     bbserver.mydomain.com # BBDISPLAY BBNETBBPAGER

10.10.0.4   solaris1.mydomain.com # dns ftp

group­compress DNS Servers10.10.0.5   dns1.mydomain.com # dns10.10.0.6   dns2.mydomain.com # dns

page NT NT Serversgroup-compress NT Servers

10.10.0.7 ntserver1.mydomain.com #

page proxys Proxysgroup-compress Cacheflow Proxy Servers

10.10.0.8 proxy1.mydomain.com # snmp

Note the line: 0.0.0.0   bbserver.mydomain.com # BBPAGER BBNET BBDISPLAYThis line tells each client where to send its output. 

We strongly recommend using this style.

Or, you could also use something like this:

Page 24: Big Brother Installation and Configuration Guide

10.10.0.1   bbserver.mydomain.com # BBPAGER BBNET BBDISPLAY ftp pop3 top cpu2logs dns

The 0.0.0.0 forces the client to do a DNS lookup every time it wants to send data to theBBDISPLAY server.  So if you ever want to move your BBDISPLAY server to a new IPaddress, then you don't have to update every client.  Just a simple DNS change.

This does also mean if DNS on your clients fails, or your main DNS server fails, then BigBrother stops working.  But, if that happens you will have bigger problems than clients notbeing able to send updates to your main Big Brother server!

4.2 Configure keywords to look for in the messages file

Use bb­config to set this up.  Use the msg directive.Sample line that may be used is below

msg:     /var/adm/messages : : atal ; anic ; rror; ERROR ; OFFLINE ; half­duplex ; ailing ;transport failed ; disk not responding ; WARNING ; core ; repeated ; NOTICE : ntpdate ;xntpd : forceload

Add/remove keywords as desired.

4.3 Customise Disk Free checksSample file /usr/local/bbc/bb­dftabThis must be configured on each client (put the settings in bb­config, and let it generate thebb­dftab file for you)

Sample bb­dftab that bb­config has produced.

## bb­dftab# BIG BROTHER CUSTOM DISK PARTITION MONITORING FILE# FORMAT: [host:]partition:warn%:panic%## bb­dftab: configuration file for disk space checking##    host can be FQDN (fully qualified domain name) or#       just a plain hostname but it is preferred that you#       use a FQDN.

Page 25: Big Brother Installation and Configuration Guide

## FOR THE SAME FILESYSTEMS ON EACH CLIENT USE EITHER# localhost:/mntpoint:XX:YY# or# /mntpoint:XX:YY## COPY THIS FILE TO bb­dftab AND EDIT TO TASTE# ANY PARTITIONS NOT EXPLICITLY LISTED HERE WILL# USE THE VALUES SET BY DFWARN & DFPANIC SET IN# bbdef.sh. DEFAULTS IN bbdef.sh ARE# WARNING AT 90% AND PANIC AT 95%## You can also use values > 100 to make it always green##/usr:92:98#/home:88:93#/db:100:101solaris1.mydomain.com:/:96:98

4.4 Configure who is notified with messagesNote: the notification section is highly configurable.  Certain people or groups can benotified at certain times for some events.  e.g. You can setup a group to only be notifiedabout printer problems, during work hours.

The example below is very simple.

In the file on the BBDISPLAY server (/usr/local/bb/etc/bbwarnsetup.cfg)change the line starting with pg­sysadmins:

e.g.

## The "pg­groupname" token specifies that the recipients listed can#       be referred to "pg­groupname" in the recipients field in the bbwarnrules.cfg#       config file.  You can define as many pagegroups that you need## i.e. pg­routeradmins: joe@localhost joey@localhost joanne@localhost# in rules: *;;*;;*;*;pg­routeradmins root@localhost## it is the equivalent of

Page 26: Big Brother Installation and Configuration Guide

#       *;;*;;*;*;joe@localhost joey@localhost joanne@localhost root@localhost## Scope: BBPAGER# Reset: Nopg­sysadmins: root@localhost [email protected]

In the file on the BBDISPLAY server (/usr/local/bb/etc/bbwarnrules.cfg)

Change it to reflect the section mentioned below:

## Enter your rules here#

*;;*;;*;*;pg­sysadmins

4.5 Update the description seen on the front page

Edit the file /usr/local/bb/etc/bbinc.shLook for the line MKBBLOCAL="<B><I>Pages Hosted Locally</I></B>"

Change it to:MKBBLOCAL="<B><I>Our Monitored Services</I></B>"

4.6 Start up the servere.g. For Solaris

# /etc/init.d/bb start

or 

# su – bbuser$ cd /usr/local/bb$ ./runbb.sh start

Check the file $BBHOME/BBOUT for errorse.g.$ tail –f /usr/local/bb/BBOUT

Page 27: Big Brother Installation and Configuration Guide

Point your web browser at your web servere.g.  http://bbserver.mydomain.com/bb

You should see Big Brother working.

4.7 Generic Instructions To Configure Extension Scripts

Note: Some scripts downloaded from http://www.deadcat.net need to be modified to makethem work.  They do not all work "out of the box".Some shell scripting knowledge is required.

Extract the required script into the "ext" dir under big brother root dir.

e.g.$ cd /usr/local/bb/ext$ tar xvf ./myextscript.tar

Check the contents of the extension script for any instructions.  You may need to changevariable settings.  You may also need to add entries into the bbsys.local file.

You will need to add the script to the bb­bbexttab file.  (TIP: easier if you use bb­configinstead)

e.g. $ cd /usr/local/BBConfig/etc$ vi bb­config

Add in your extension script file namee.g.host     myserver1.mydomain.comip:      0.0.0.0ext_add  myextscript.sh

Restart big brothere.g.  $ /usr/local/bbc/runbb.sh restart

Page 28: Big Brother Installation and Configuration Guide

4.8 Extension ScriptsCheck out http://ww.deadcat.net

Some scripts that may be useful ­ names may be slightly different   (download the latestversion)

bbtray­0.5­1.zip

This   is   a   little  win32  tray­icon  program  that  monitors   a  predefined  BBDISPLAY page(normally the "Condensed View" page) and alerts when the status of that page changes,using a popup window and sound alarm.

bb­ntp.sh ­ Test NTP on various machines. Warns when time drifts too far. 

bb­iostat.sh ­ performance checks using vmstat and iostat

bb­vxcheck.sh ­ Veritas disk checks

bb­top.pl

bb­cpu2.sh

bb­bind.sh

bb­prtdiag.sh

network2.sh

larrd  (produces performance/trending graphs)

bbmrtg.pl

bbnetbackup.sh

bbradius.sh

5. Install Client Software on new Target Server

e.g. on a Sun sever called solaris1.Going to a Sun sever called solaris2.Using big brother version 1.9e(Note target client must be the same OS type.  e.g.  You cannot use a Sun Sparc to create aclient for a Solaris Intel box.  Don't forget to copy your master bb­hosts file to it. Runthrough the install procedure to make sure that the clients are also installed properly(bbchkcfg.sh/bbchkhosts.cfg)

Page 29: Big Brother Installation and Configuration Guide

Add the entry to BBConfig

On your BB Server edit bb­config file first, add your new hoste.g.host: solaris2.mydomain.comip: 10.10.0.10template: solarisbbset: UnixServers

Regenerate the bb configuration files$ /usr/local/BBConfig/bin/bbconfigure

Generate client tar ball (ready to transfer to the client server)# cd /usr/local/bbc

# tar cvf <clientname>.tar *

Transfer client tar file to new servere.g. # scp <clientname>.tar destclient:/usr/local/

Login to the destination client# ssh solaris2

Create a big brother group and user to own and run Big Brother

Note: follow your site guidelines on user and group creation.  The following is anexample only

#groupadd ­g 1984 bbgroup#useradd ­u 1984 ­g 1984 ­d /usr/local/bbc ­s /bin/ksh ­mbbuser

Move tar file into the bbc directory# mv <clientname>.tar /usr/local/bbc

Go to bb client dir# cd /usr/local/bbc

Page 30: Big Brother Installation and Configuration Guide

Extract the client files# tar xvf <clientname>.tar

Make the client automatically start on boot

If you wish to start BB automatically at startup, create a file called bbc and put it in your /etc/init.d dir:

eg. For Solaris# vi /etc/init.d/bbc

Put vi into insert mode (i)Then paste the following script

#!/bin/sh## bbc            This shell script takes care of starting and stopping#               Big Brother Client## description: Big Brother is a system & network monitor#BBHOME=/usr/local/bbcBBUSER=bbuser

[ ­f $BBHOME/runbb.sh ] || exit 0

# See how we were called.case "$1" in  start)        # Start daemons.        su ­ $BBUSER ­c "cd $BBHOME;./runbb.sh start"        ;;  stop)        # Stop daemons.        su ­ $BBUSER ­c "cd $BBHOME;./runbb.sh stop"        ;;  status)

Page 31: Big Brother Installation and Configuration Guide

        status bb        ;;  restart|reload)        $0 stop        $0 start        ;;  *)        echo "Usage: bbc {start|stop|restart|reload|status}"        exit 1esac

exit 0

#End of Big Brother startup script

Now to make it start automatically…# ln ­s /etc/init.d/bbc /etc/rc2.d/S99bbc

# ln ­s /etc/init.d/bbc /etc/rc0.d/K01bbc

Make the init script executable

# chmod u+x /etc/init.d/bbc

Start the clientEither as root

# /etc/init.d/bbc start

Or become bbuser

# su – bbuser

$ ./runbb.sh start

Check for errors.

Check the file /usr/local/bbc/BBOUT for errors

If everything is working, you should see results on the BBDISPLAY server soon.

Page 32: Big Brother Installation and Configuration Guide

6. TipsIf you remove/disable a test that had been working, you need to remove the correspondingfile from the logs dir.  If you don't, the test will turn purple, indicating “no report”.

e.g.  Stop the test that was running on a server called “solaris1.mydomain.com”.  The testwas looking for processes, which shows up on the display server under a column title of "ps"

On the BBDISPLAY server

$ cd /usr/local/bb/bin

$ ./bbrm solaris1.mydomain.com ps

Next refresh on the BBDISPLAY server should change from purple to a "­"

Big Brother DocumentationFor complete documentation on your current version click on the "i" in a circle displayed onevery Big Brother page.

How to Acknowledging alerts

Subject: Re: !BB ­ 1554311! solaris1.mydomain.com.disk ­ 100010053108013

The code in the subject line can be used to Acknowledge the alert.  For thisparticular email it is "1554311".

To stop further alerts, enter that code on the bb page with a lightning rod.  Specifyhow many minutes "grace" you want.

This code is unique for each alert, and person.  To stop the alerts for everyonechange the last 2 numbers to 99.  eg "1554399"

SMS setup for big brother (on Solaris)

Page 33: Big Brother Installation and Configuration Guide

Download the sms client from http://www.styx.demon.co.uk

(This guide is for version sms_client­2.0.8y)

Uncompress the cliente.g. # gunzip ./sms_client­2.0.8y.tar.gz

Untar the sms_cliente.g.# tar xvf ./sms_client­2.0.8y.tar

Read the README

Install:servername# sh configureservername# make; make install

If you are in the UK you need to update the phone numbers used:# cd /etc/sms/services# vi vodafonechange the number to: 07785499999

# vi vodafone_tapchange the number to: 07785499993

# vi cellnetchange the number to: 07860980480

# vi orangechange the number to: 07973100602

# vi one2onechange the number to: 07956201072

Add entries to your phone book# cd /etc/sms# vi sms_addressbookBelow the line that says

Page 34: Big Brother Installation and Configuration Guide

User4 = "vodafone:12344"

Add you own entriese.g.  myname = "orange:07912345678"

Configure the modem# vi  /etc/sms/sms_modem

Uncomment the line that says:# MDM_device  = "cua/a"   # SOLARISe.g.MDM_device  = "cua/a"   # SOLARIS

Check the dir /var/lock exists, if not create it# mkdir /var/lock 

========(The following dial out section was taken from www.kempston.net/solaris/dialup.html)Configuring Solaris for high­speed dial out

Please note that you must be logged in as root while implementing these instructions.

These instructions describe how to configure Solaris and your modem for dial­out to aremote computer. Implement these instructions first, even if you want toconfigure your system for dial in access.

1. Configure your serial port for dial out

Start admintool under CDE:

        # admintool &

Select the Browse menu and then Serial Ports from the drop­down list. Click on the linestarting a if your modem is attached to the first serial port or on the linestarting b if your modem is connected to the second serial port. Select the Edit menu andthen Modify from the drop­down list.

Change the following fields:

Page 35: Big Brother Installation and Configuration Guide

        Template:    Modem ­ Dial out Only        Baud Rate:   9600

Cick on OK and close admintool.

2. Test communication with the modem

The unix command "tip" is used to communicate with a modem. If you're interested in thegory detail, the manual page for this command can be displayed by typing:

         # man tip

If your modem is attached to the first serial port:

         # tip /dev/cua/a

If your modem is attached to the second serial port:

         # tip /dev/cua/b

and the command should respond:

         connected

If it responds:

         All ports busy

It means either that your serial port is configured incorrectly, perhaps for dial in instead ofdial out, or that there is a more fundamental problem in communicating withthe port. In this case, have a look at Celeste Stokely's Tutorial on Solaris 2.x Modems &Terminals which contains a wealth of useful information about modems.

Type:

         ATZ

and the modem should respond:

Page 36: Big Brother Installation and Configuration Guide

         OK

If there's no response from the modem, check that you're using a straight­through cable withpin 2 at one end connected to pin 2 at the other end, pin 3 to pin 3 andso on. A "null­modem" or cross­over cable, designed for use with a terminal, will not work.

Type:

         ATI4

Most modems respond to this command by reporting their current settings. If this doesn'twork, try AT&v, ATL5, ATL6, ATL7 or AT*c. If all else fails, consultyour modem manual. When using a 3COM USR V90 modem, it responds:

        U.S. Robotics 56K Message Settings...

        B0  E1  F1  L2  M1  Q0  V1  X4  Y0        SPEED=300   PARITY=N  WORDLEN=8        DIAL=TONE    OFF LINE

        &A1  &B1  &C1  &D2  &H1  &I0  &K1        &M4  &N0  &P0  &R2  &S0  &T5  &U0  &Y1        ...

Note that the actual speed at which Solaris is communicating with the modem is only 300baud, or 30 characters per second, despite the speed having been set usingadmintool to be 9600. The reason for this is that tip defaults to a speed of 300 baud and we'llfix this in the next step.

Close tip by typing "ENTER key, tilde, full stop" as three key strokes:

          ~.

3. Set the modem DTE speed

Edit the file /etc/remote and insert a line at the start of this file reading:

         modem:dv=/dev/cua/a:br#115200

Page 37: Big Brother Installation and Configuration Guide

If your modem is attached to the first serial port, or:

         modem:dv=/dev/cua/b:br#115200

If your modem is attached to the second serial port.

This enables us to communicate with the modem at a speed of 115200 bits per second. It'simportant to understand that there are two speeds to be considered inmodem communication. There's the speed at which the host computer talks to a connectedmodem and this is known as the Data Terminal Equipment or DTEspeed. There's also the speed at which the modem transmits and receives data across thetelephone line and this is known as the Data Communication Equipment orDCE speed. A 56K or V90 modem is capable of a DCE speed of up to 56K, although this isunlikely to be achieved in practice. Data sent down a telephoneconnection is often compressed with the receiving modem uncompressing the data beforesending it to the host computer. So a modem to modem speed (DCE) of56K could result in a modem to computer speed (DTE) well in excess of 56K. For thisreason, the DTE speed should be set at least 50% higher than the maximumDCE speed and a DTE speed of 115200 is recommended for use with 56K modems.

However, not all Sun hardware is capable of talking to a serial port at this speed. If you havea Sun Ultra 5 or better, or an Intel P90 or better, your system shouldbe able to sustain a DTE speed of 115200. If you have an older Sun system, you may wellnot be able to drive a V90 modem at its maximum speed and will need toexperiment to find the highest DTE speed that your hardware supports. If 115200 doesn'twork, try specifying 38400, 19200 or 9600 in the line in /etc/remote.

4. Test high­speed communication with the modem

Try the tip test again, this time specifying the name of the new entry in /etc/remote as aparameter to tip and you should be rewarded with a high­speed connection tothe modem:

         # tip modem        connected        ATI4        U.S. Robotics 56K Message Settings...

        B0  E1  F1  L2  M1  Q0  V1  X4  Y0

Page 38: Big Brother Installation and Configuration Guide

        SPEED=115200  PARITY=N  WORDLEN=8        DIAL=TONE    OFF LINE

        &A1  &B1  &C1  &D2  &H1  &I0  &K1        &M4  &N0  &P0  &R2  &S0  &T5  &U0  &Y1        ...

Check that the output from ATI4 reports the DTE speed correctly as 115200 or whateveryou've set this to.

While connected to the modem, check that the following modem settings are correct:

        &B1    Fixed serial port rate        &C1    Normal Carrier Detect (CD) operation        &D2    Normal DTR operations        &H1    Hardware flow control using Clear To Send (CTS)        &N0    Connection (DCE) speed determined by negotiation                with the remote modem to the highest usable speed        &R2    Received data to computer only on RTS

To change one of the '&' modem register settings, type AT followed by the register nameand required value. For example, to change the value of register &B to 1,type:

         AT&B1

When all the changes have been made, save the current settings to the modem's non­volatileRAM by typing:

         AT&W

Do this even if no register values have been changed because saving the current values willsave the current port speed as set by tip.

Finally, exit from tip by typing "ENTER key, tilde, full stop" as three key strokes:

          ~.

Page 39: Big Brother Installation and Configuration Guide

5. Check permissions and ownership of the device files

The permissions and ownership of the serial port device files may well be incorrect. Checkthem, for the first serial port, by typing "ls ­l /dev/cua/a" to see details ofthat file (which is a symbolic link to the underlying device file) and by typing "ls ­lL /dev/cua/a" to see details of the underlying device file. Replace "/dev/cua/a" with"/dev/cua/b" for the second serial port. If permissions and ownership are correct, the outputshould be like:

         # ls ­l /dev/cua/b        lrwxrwxrwx   1 root     root          32 Jun 27 22:14 /dev/cua/b ­> ../../devices/isa/asy@1,2f8:b,cu        # ls ­lL /dev/cua/b        crw­­­­­­­   1 uucp     tty      106,131073 Dec 13 17:16 /dev/cua/b

In this example, the permissions of the underlying device file are rw­­­­­­­, the owner is uucpand the group is tty. Ignore the remaining fields on the output whichvary from one system to another. If your device files don't have these permissions andownerships, change them by typing:

For the symbolic link /dev/cua/b:

        # chmod 777 /dev/cua/b        # chown ­h root /dev/cua/b        # chgrp ­h root /dev/cua/b

For the underlying device file:

        # chmod ­R 600 /dev/cua/b        # chown uucp /dev/cua/b        # chgrp tty /dev/cua/b

Configuration of Solaris for high­speed dial out capability is now complete.

6. Dial a remote system

If you have a remote system that accepts incoming modem terminal connections, theprocedure for connecting to a remote system is as follows:

Page 40: Big Brother Installation and Configuration Guide

First, connect to the modem as before:

        # tip modem        connected

Then tell the modem to dial the remote system by typing ATDT followed by the telephonenumber of the modem attached to the remote system. For example, to dialout to telephone number 123­4567, type:

        ATDT1234567

You should hear the local modem dialling, followed by audio tones while it negotiates aconnection (DCE) speed with the remote modem. Finally, the CONNECTstring from the local modem should appear, followed by the greeting and login prompt fromthe remote computer: 

        CONNECT 45333/ARQ/V90/LAPM/V42BIS        Welcome to Kempston Networks        login:

Note that a V90 connection will be achieved only if the remote system is running a digitalterminal server, such as those used by ISPs. When there are V90 modemsat both ends of the link, the best speed achievable is 33.6K bits per second. In this case, youmay see a CONNECT string like:

        CONNECT 31200/ARQ/V34/LAPM/V42BIS        Welcome to Kempston Networks        login:

Not all modems output the CONNECT string. If you don't see the login prompt within acouple of seconds of the connection being established, press the ENTERkey once. This should trigger a login prompt from the remote computer.

(end of section taken from http://www.kempston.net/solaris/dialup.html)

==============Configure Big Brother to send SMS messages

Edit the file $BBHOME/etc/bbwarnrules.cfg

Page 41: Big Brother Installation and Configuration Guide

Add a new rule called smsclient­<sms_person>:<standard BB rules>

Eg. *;*;*;;1­5;0800­1900;smsclient­craig:~15:60

GNU tar Installation

Download from http://www.gnu.org/software/tar/tar.html

# gunzip ­c tar­1.15.1.tar.gz | tar xf ­# cd tar­1.15.1# ./configure# make# make install

Perl Installation

Download the current stable release of Perl

   http://www.cpan.org/src/stable.tar.gz

This document assumes you are installing Perl 5.8.6

# gunzip ­c stable.tar.gz | tar xf ­# cd perl­5.8.6

Type the following:

# sh Configure ­Dcc=gcc

Accept most of the defaults, with some specific changes:

Which of these apply, if any? [solaris_2]Operating system name? [solaris]Operating system version? [2.9]   (or 2.7, 2.8, 2.9 ...)Build Perl for SOCKS? [n]Use the PerlIO abstraction layer? [y]Build a threading Perl? [n]Build Perl for multiplicity? [n]

Page 42: Big Brother Installation and Configuration Guide

Use which C compiler? [gcc]Directories to use for library searches?[/usr/local/lib /usr/lib /usr/ccs/lib]What is the file extension used for shared libraries? [so]Try to use long doubles if available? [n]What libraries to use? [­lsocket ­lnsl ­ldl ­lm ­lc]What optimizer/debugger flag should be used? [­O]Any additional cc flags? [­fno­strict­aliasing ­I/usr/local/include]Any additional cc flags? [­fno­strict­aliasing ­pipe ­I/usr/local/include]Any additional ld flags (NOT including libraries)? [ ­L/usr/local/lib]Try to use 64­bit integers, if available? [y]   (unless you're using 32­bit Solaris)Try to use maximal 64­bit support, if available? [n]What is your architecture name [sun4­solaris­64int]Installation prefix to use? (~name ok) [/usr/local/]What installation prefix should I use for installing files? (~name ok)[/usr/local/]Pathname where the private library files will reside? (~name ok)[/usr/local/lib/perl5/5.8.6]Where do you want to put the public architecture­dependent libraries? (~name ok)[/usr/local/lib/perl5/5.8.6/sun4­solaris]Do you wish to wrap malloc calls to protect against potential overflows? [y]Do you wish to attempt to use the malloc that comes with perl5? [n]Installation prefix to use for add­on modules and utilities? (~name ok)[/usr/local/]Pathname for the site­specific library files? (~name ok)[/usr/local/lib/perl5/site_perl/5.8.6]Pathname for the site­specific architecture­dependent library files? (~name ok)[/usr/local/lib/perl5/site_perl/5.8.6/sun4­solaris]Do you want to configure vendor­specific add­on directories? [n]Colon­separated list of additional directories for perl to search? [nonePathname where thepublic executables will reside? (~name ok)[/usr/local/bin]]Install any extra modules (y or n)? [n]Directory for the main Perl5 html pages? (~name ok) [/usr/local/doc/html/]Directory for the Perl5 module html pages? (~name ok) [none][/usr/local/doc/html/modules]List of earlier versions to include in @INC? [none]Do you want to install perl as /usr/bin/perl? [n]Shall I use /usr/local/bin/nm to extract C symbols from the libraries? [n] 

Page 43: Big Brother Installation and Configuration Guide

Do you wish to use dynamic loading? [y]Source file to use for dynamic loading [ext/DynaLoader/dl_dlopen.xs]Any special flags to pass to /usr/local/bin/gcc ­c to compile shared library modules?[­fPIC]What command should be used to create dynamic libraries?[gcc]Any special flags to pass to /usr/local/bin/gcc to create a dynamically loaded library?[­G ­L/usr/local/lib]Any special flags to pass to /usr/local/bin/gcc to use dynamic linking?[none]Build a shared libperl.so (y/n) [n]Where do the main Perl5 manual pages (source) go? (~name ok)[/usr/local/man/man1]What suffix should be used for the main Perl5 man pages? [1]Where do the perl5 library man pages (source) go? (~name ok)[/usr/local/man/man3]What suffix should be used for the perl5 library man pages? [3]Your host name appears to be "bbserver". Right? [y]What is your domain name? [.mydomain.com]What is your e­mail address? [[email protected]]Perl administrator e­mail address [[email protected]]Do you want to install only the version­specific parts of perl? [n]What shall I put after the #! to start up perl ("none" to not use #!)?[/usr/local/bin/perl]Where do you keep publicly executable scripts? (~name ok)[/usr/local/bin]Pathname where the add­on public executables should be installed? (~name ok)[/usr/local/bin]Pathname where the site­specific html pages should be installed? (~name ok)[/usr/local/doc/html]Pathname where the site­specific library html pages should be installed? (~nameok)[/usr/local/doc/html/modules]Pathname where the site­specific manual pages should be installed? (~name ok)[/usr/local/man/man1]Pathname where the site­specific library manual pages should be installed? (~name ok)[/usr/local/man/man3]Pathname where add­on public executable scripts should be installed? (~name ok)[/usr/local/bin]Use the "fast stdio" if available? [y]

Page 44: Big Brother Installation and Configuration Guide

Try to understand large files, if available? [n] What is the extension of dynamically loaded modules [so]Shall I ignore gethostname() from now on? [n]What is the size of a character (in bytes)? [1]Do you still want to use vfork()? [n]Doubles must be aligned on a how­many­byte boundary? [8]Use which function to generate random numbers? [drand48]What type pointer is the second argument to getgroups() and setgroups()?[gid_t]What pager is used on your system? [/usr/bin/more]What is the type for socket address structure sizes? [int]Which compiler compiler (yacc) shall I use? [yacc]What extensions do you wish to load dynamically?[blah..blah..blah]  (use the default)What extensions do you wish to load statically? [none]

Press return or use a shell escape to edit config.sh:

Run make depend now? [y]

When it is finished, do:

   grep cppsymbols config.sh

and make sure "­D_LARGEFILE_SOURCE ­D_FILE_OFFSET_BITS=64" does NOTappear.

_LARGEFILE_SOURCE=1 is okay, ensure it does not have the “­D” on the front if it._FILE_OFFSET_BITS=64 is okay, ensure it does not have the “­D” on the front if it.

Then do:   mv makefile old.makefile   make   make test  (ignore errors)   make install

RRD Installation

Page 45: Big Brother Installation and Configuration Guide

Why use RRD?Faster than MRTG’s default graphing method.

RRD tool is used with LARRD and MRTG.  Other tools use RRD as well.

Download from http://www.mrtg.org

# mv rrdtool­1.0.49.tar.gz /usr/local# cd /usr/local# gunzip rrdtool­1.0.49.tar.gz# tar xvf rrdtool­1.0.49.tar# cd rrdtool­1.0.49# ./configure# make# make install# make site­perl­install# ln ­s /usr/local/rrdtool­1.0.49 /usr/local/rrdtool

LARRD Installation

Why use LARRD?

LARRD is a performance graphing tool used with BB.  Will show you graphs of trends ofselected tests.

Ensure the RRD tool has already been installed.

Download larrd­0.43c from http://ww.deadcat.net

Copy to /usr/local on your big brother display server.

Untar the file:

# tar xvf ./larrd­0.43c.tar

Create a soft link# ln ­s /usr/local/larrd­0.43c /usr/local/larrd

Page 46: Big Brother Installation and Configuration Guide

# chown ­R bbuser:bbgroup larrd

The following instructions are from the INSTALL file

larrd INSTALL­­­­­­­­­­­­­

1) untar larrd­$VER.tar in /usr/local (or the directory of local software   installs), but you've already done this if you are reading this file.   If you don't choose /usr/local/, your life will be more difficult.   Beginning with editing larrd.pl and changing where larrd lives.

2) cd into the directory that was created.

   Type 'perl install ­­bbhome /path/to/BBHOME ­­larrdhome /path/to/LARRDHOME'

3) link /usr/local/larrd to /usr/local/larrd­$VER.    e.g.   # cd /usr/local           # ln ­s ./larrd­0.43c ./larrd

4) link $BBHOME/ext/larrd to /usr/local/larrd.   e.g. # ln ­s /usr/local/larrd /usr/local/bb/ext/larrd

5) larrd­grapher.cgi and larrd­graphs.cgi ($LARRDHOME/cgi/*) will    be copied to the cgi­bin directory for your web server.    e.g. /usr/local/apache2/cgi­bin   Be sure to properly set ownership and permissions so the webserver   can execute it.  If you have not installed larrd in /usr/local/larrd,   you will need to edit larrd­grapher.cgi and change the larrd installation   directory.

Our TIP: after larrd­grapher.cgi is copied to the cgi­bin dir you may want to delete theversion in the /usr/local/larrd directory.  It can be confusing later if you want edit the cgiscript and find it in the larrd directory first.  I would suggest making a link from the cgi­bindir script to the larrd directory.e.g.  ln ­s /usr/local/apache2/cgi­bin/larrd­grapher.cgi /usr/local/larrd/cgi/larrd­grapher.cgi

  ­ Edit larrd­graphs.cgi to check or set these items:    ­ Check the path to perl on the first line (magic line).

Page 47: Big Brother Installation and Configuration Guide

    ­ Make sure the paths to BBHOME and LARRDHOME match your installation.    ­ Check the list of vmstat larrd graphs for your platform    ­ Check the list of netstat larrd graphs for your platform    ­ Check the list of disk larrd graphs for your platform  ­ Apply patch file bb­rep.html.patch to bb­rep.html file on your BBDISPLAY      host to add a hyperlink to the larrd­graphs.cgi to the reports menu.

6) add "larrd/larrd.pl" to bb­bbexttab in $BHOME/etc

  If you use BBConfig:    e.g.  # vi bb­config

    find the BBDISPLAY server and add a line similar to this (if it not already there)

    ext_add : larrd/larrd.pl

  Regenerate the bb configuration files  # /usr/local/BBConfig/bin/bbconfigure

7) edit /usr/local/larrd/larrd­config.pl

8) Change permissions on the larrd dir   # chown ­R bbuser:bbgroup /usr/local/larrd­0.43c

9) change permissions on $LARRDHOME/tmp so your web server can write to it  e.g. # chgrp apache /usr/local/larrd/tmp       # chmod 775 /usr/local/larrd/tmp

10) Restart BB.

11) Once your BBDIPSPLAY is rebuilt, you should now see a trends column.   it may take a few iterations to properly make all the HTML   and graphs.

If nothing displays check the LARRDOUT file in $BBHOME for errors.

Page 48: Big Brother Installation and Configuration Guide

To activate LARRD trending on a Big Brother Client

Copy the individual bottom feeder scripts to $BBHOME/extWhere BBHOME is the directory for the bbclient code ­ /usr/local/bbc

e.g.# cp  /usr/local/larrd/bf/vmstat­bf.sh $BBHOME/ext/.# cp  /usr/local/larrd/bf/netstat­bf.sh $BBHOME/ext/.

Note: This is different to what INSTALL.clients recommends.  This allows greater controlover which bottom feeder scripts are run on each client.  i.e. add the scripts to bb­bbexttab,rather than editing bf­larrd.sh on every client.

Add something like this to bb­config for that server

host:  bbclient.mydomain.comip:         10.0.0.2ext: vmstat­bf.pl netstat­bf.pl

Regenerate bb­*tab files# /usr/local/BBConfig/bin/bbconfigure

Transfer the new client code to the client

Restart client.

After 10+ minutes trends should appear on your BBDISPLAY server.

MRTG installation

Why use MRTG?Graph network information e.g. check bandwidth of servers.  BB has an extension that willmonitor MRTG graphs to ensure thresholds are not exceeded.  e.g. if the input to a serverexceeds 80% you can set an alarm.  If the input drops below 10% you can also set an alarm.etc, etc.

Ensure RRD tool has already been installed.

Page 49: Big Brother Installation and Configuration Guide

Ensure Perl has been installed

Review the Install guide for unix:http://people.ee.ethz.ch/~oetiker/webtools/mrtg/unix­guide.html

Install zlib first

Download from http://www.gzip.org/zlib/# gunzip ­c zlib­1.2.1.tar.gz | tar xf ­# cd zlib­1.2.1# ./configure# make# make install

Install jpeg libraries

Download from ftp://ftp.uu.net/graphics/jpeg/

Get the file jpegsrc.v6b.tar.gz

Once transferred to your big brother server uncompress# gunzip ­c jpegsrc.v6b.tar.gz | tar xf ­# cd jpeg­6b# ./configure# make# make install# make install­lib

Installing libpng

Download from http://www.libpng.org/

Get the file libpng­1.2.8.tar.gz

Once transferred to your big brother server uncompress# gunzip ­c libpng­1.2.8.tar.gz | tar xf ­# cd libpng­1.2.8# cp scripts/makefile.solaris makefile# make

Page 50: Big Brother Installation and Configuration Guide

# make install

Installing GD

Download from http://www.boutell.com/gd/http/

Get the file gd­2.0.33.tar.gz

Once transferred to your big brother server uncompress# gunzip ­c gd­2.0.33.tar.gz | tar xf ­# cd gd­2.0.33# ./configure –disable­shared# make# make install

Install MRTG

Download from http://ww.mrtg.org

Once transferred to your big brother server uncompress# gunzip ­c mrtg­2.11.1.tar.gz | tar xf ­# cd mrtg­2.11.1# ./configure# make# make install# ln ­s /usr/local/mrtg­2 /usr/local/mrtg# cp ­r doc /usr/local/mrtg# mkdir /usr/local/mrtg/wor# chown apache /usr/local/mrtg/work# mkdir /usr/local/mrtg/cfg# cp /usr/local/mrtg/bin/cfgmaker /usr/local/mrtg/cfg/cfgmaker# cd /usr/local/mrtg/cfg

Create the mrtg.cfg file

# vi mrtg.cfg

### Global Defaults

Page 51: Big Brother Installation and Configuration Guide

#  to get bits instead of bytes and graphs growing to theright# Options[_]: growright, bits

EnableIPv6: noWorkDir: /usr/local/mrtg/workOptions[_]: bits,growrightLogFormat: rrdtoolPathAdd: /usr/local/rrdtool/bin/LibAdd: /usr/local/rrdtool/lib/perl/

# add new files here# ensure the filename matches the host name big brotheruses#e.g.#Include: /usr/local/mrtg/cfg/bbclient.mydomain.com.cfg#Include: /usr/local/mrtg/cfg/cisco1.mydomain.com.cfg

Ensure all adjustments have been made to use RRDhttp://people.ee.ethz.ch/~oetiker/webtools/mrtg/mrtg­rrd.html

Configure bbmrtg.pl

Why use bbmrtg.pl?

This plugin monitors your MRTG graphs.  Highly customisable thresholds can be set.e.g. if the input to a server exceeds 80% you can set an alarm.  If the input drops below 10%you can also set an alarm.  etc, etc.

Download bbmrtg­1.6.tar.gz from http://ww.deadcat.net# gunzip ­c  bbmrtg­1.6.tar.gz | tar xf ­# cd bbmrtg­1.6# cp bbmrtg.template /usr/local/mrtg/cfg# cp bbmrtg­1.6.pl  /usr/local/bbc/ext/# cd /usr/local/bbc/ext# mv bbmrtg­1.6.pl  bbmrtg.pl

Edit the file# vi bbmrtg.pl

Page 52: Big Brother Installation and Configuration Guide

Change the first line to your perl binary if needed

Change this line from:my $mrtgCfg = '/var/mrtg/cfg/bbmrtg.cfg';  # aka '~mrtg/mtrg.cfg'tomy $mrtgCfg = '/usr/local/mrtg/cfg/mrtg.cfg';  # aka '~mrtg/mtrg.cfg'

Uncomment this line:# use lib '/usr/local/rrdtool/lib/perl';

Add this line to your bb­config file for your BBDIPSPLAY server

ext_add:        bbmrtg.pl

e.g.host: bbserver.mydomain.comip: 0.0.0.0template: solaristemplate: veritasbbservices: BBDISPLAY BBNET BBPAGERbbset: UnixServersprocpanic: /usr/local/apache2/bin/httpd;<=2ext_add: larrd/larrd.pl bf-larrd.sh bbmrtg.pl

Regenerate bb­*tab files# /usr/local/BBConfig/bin/bbconfigure

Configure mrtg­rrd.cgi

Why use mrtg­rrd.cgil?

mrtd­rrd.cgi is a script that allows you to see all your MRTG graphs on one page.  It is usedby bbmrtg.pl.

Download the mrtg­rrd cgi from http://www.mrtg.org# gunzip ­c mrtg­rrd­0.7.tar.gz | tar xf ­# cd mrtg­rrd­0.7

Edit mrtg­rrd.cgiDirectly after this section:                } elsif (/^([\w\d]+) *: *(\S.*)$/) {                        my ($opt, $val) = (lc($1), $2);

Page 53: Big Brother Installation and Configuration Guide

                        $cfgref­>{$opt} = $val;                        next;Add:                } elsif (/^bb\*.*/) {                        next;

Change this line to match the location of the mrtg.cfg file on your systemBEGIN { @config_files = qw(/home/fadmin/mrtg/cfg/mrtg.cfg); }e.g.BEGIN { @config_files = qw(/usr/local/mrtg/cfg/mrtg.cfg); }

Change this line from: } elsif (/^Include\s*:\s*(\S*)$/) { To: } elsif (/^Include\s*:\s*(\S*)$/i) {

Copy to the web server cgi­bin dir# cp mrtg­rrd.cgi /usr/local/apache2/cgi­bin/

Add a device for mrtg to monitor# cd /usr/local/mrtg/cfg

e.g.#./cfgmaker ­­if­template=bbmrtg.template [email protected] ­outputbbclient.mydomain.com.cfg

This will create a file called bbclient.mydomain.com.cfg in the /usr/local/mrtg/cfg directory

Edit the mrtg.cfg file to include this filee.g.# vi mrtg.cfg

Add this to the end of the file:

Include: /usr/local/mrtg/cfg/bbclient.mydomain.com.cfg

Configure MRTG to run from cron.

# crontab ­e

Page 54: Big Brother Installation and Configuration Guide

Add a line like this (all on one line):

0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/mrtg/bin/mrtg /usr/local/mrtg/cfg/mrtg.cfg ­­logging /var/adm/mrtg.log

BigBrother.pm Installation

Why use BigBrother.pm?

This is a perl module used with some perl extension scripts on deadcat.  You will be usingperl scripts that need it.

Download from http://www.deadcat.net

# gunzip BigBrother.pm.gz# mkdir /usr/local/bbc/ext/perl# cp  BigBrother.pm /usr/local/bbc/ext/perl

FPING Installation

Why use FPING?It is faster than standard ping.  Pings are done in parallel to many servers.  Can be set tolimit number of pings per “ping storm”.  e.g. ping all servers in groups of 10 at a time.

Install the FPING binary

Download from http://www.fping.com/

# tar xvf fping.tar# cd fping­2.4b2_to# ./configure# make# chmod u+x install­sh# make install

Change permissions on the fping binary to allow any user to execute it.e.g. # chmod u+s /usr/local/sbin/fping

Page 55: Big Brother Installation and Configuration Guide

Note: this is a security risk.  Another option is to install and use “sudo”

Install fping.pl

Note: This script needs “Date::Manip” from http://search.cpan.org andBigBrother.pm from http://www.deadcat.net

Ensure they have both been installed

Download from http://www.deadcat.net# gunzip ­c fping.pl.tar.gz | tar xf ­# cp fping.pl /usr/local/bbc/ext

# vi /usr/local/bbc/ext/fping.pl

Change this line from$fping_command = "sudo fping";To$fping_command = "/usr/local/sbin/fping";

Add “fping.pl” to bb­config for the BBNET servere.g.  

host: bbserver.mydomain.comext_add:  fping.pl

Regenerate bb­*tab files# /usr/local/BBConfig/bin/bbconfigure

Disable Big Brother server from performing pings

Edit /usr/local/bb/etc/bbdef­server.sh to stop BB itself from doing any ping testschange CONNTEST=TRUEToCONNTEST=FALSE

Page 56: Big Brother Installation and Configuration Guide

Configure SNMP integration

Why use SNMP?Can be used to monitor any SNMP device.  Tests are available for cisco, netapp, lotus­notes,nokia, cacheflow, etc

Install openssl (if not already installed)

Download from http://ww.openssl.com

Note: Solaris 9 and above contain /dev/random.  If you are installing OpenSSL on an earlierversion you will need to install a patch.

“If you are using Solaris 8, you can add /dev/urandom and /dev/random devices by installingpatch 112438 (Sparc) or 112439 (x86), which are available via the Patchfinder athttp://sunsolve.sun.com (Solaris 9 includes these devices by default). For /dev/randomsupport for earlier Solaris versions, see Sun's statement at http://sunsolve.sun.com/pub­cgi/retrieve.pl?doc=fsrdb/27606&zone_32=SUNWski (the SUNWski package is available inpatch 105710).”** http://www.openssl.org/support/faq.html#USER1

Note:  openssl­0.9.7e.tar.gz is actually broken on Solaris.You may need a stable snapshot from here:ftp://ftp.openssl.org/snapshot/

# gunzip ­c openssl­0.9.7e.tar.gz | tar xf ­# cd openssl­0.9.7e# ./config# make# make test# make install

Ensure SNMP is not currently running

• The following section has been taken from the Net­SNMP install guide.

Determine existing SNMP functionality

Page 57: Big Brother Installation and Configuration Guide

SNMP uses ports 161 and 162 by default.  Only one application can use them at a time.  Ifthere is an existing SNMP application (eg. Sun's snmpdx daemon) you need to either turnthis off or work around it.   You may also have a previous version of net­snmp, the olderucd­snmp, or something completely different.  The following commands:

   ps ­ef | grep snm | grep ­v grep   ps ­ef | grep mibi | grep ­v grep

If you see something like:

root 643 1 0 Jan 16 ? 5:49 /usr/local/sbin/snmpd

You probably have an old version of net­snmp running

If you see something like:

    root  1844     1  0   Jan 14 ?        0:00 /usr/lib/snmp/snmpdx ­y ­c /etc/snmp/conf    root  1882     1  0   Jan 14 ?        0:00 /usr/lib/dmi/snmpXdmid ­s bbserver.mydomain.com

and/or

    root  1851  1844  0   Jan 14 ?        1:27 mibiisa ­r ­p 32790

then Sun's SNMP daemons are running.

Out of the box, Sun runs four SNMP daemons; mibiisa, idmispd, xnmpXdmid and snmpdx.

These must be disabled before running net­snmp.  Here is the procedure:

# cd /etc/rc3.d# ./S76snmpdx stop# ./S77dmi stop# mv S76snmpdx s76snmpdx# mv S77dmi s77dmi

If you are using Solstice Disksuite, you may also be running mdlogd.  Leave this alone.

NET­SNMP Installation

Page 58: Big Brother Installation and Configuration Guide

Download from http://net­snmp.sourceforge.net/ 

Note: you must use gnu tar to extract this

# gunzip ­c net­snmp­5.2.tar.gz | /usr/local/bin/tar xf ­# cd net­snmp­5.2# ./configure  ­­enable­shared ­­enable­embedded­perl \  ­­with­persistent­directory=/var/net­snmp ­­with­logfile=/var/log/snmpd.log \  ­­with­default­snmp­version=3 ­­with­gnu­ld ­­disable­developer 

# make

If you get a fatal error like this while executing “make”:/usr/include/sys/swap.h:47:2: #error "Cannot use swapctl in the large files compilationenvironment"

...you will need to reinstall Perl, using the instructions located earlier in this guide.

If you do not get any fatal error messages, run this:# make install

Install the NET­SNMP Perl Modules

# cd perl# perl Makefile.PL# make# make test# make install (as root)

Test a SNMP device

Try something similar to this:# snmpget ­v1 –c public ciscorouter1.mydomain.com sysDescr.0

Where “public” is the read­only community string for your SNMP device.

Install the CPAN Perl Modules

Download the Net::SNMP package from http://search.cpan.org# gunzip ­c Net­SNMP­5.0.1.tar.gz | tar xf ­

Page 59: Big Brother Installation and Configuration Guide

# cd Net­SNMP­5.0.1# perl Makefile.PL

You may get this warning:Warning: prerequisite Crypt::DES 2.03 not found.Warning: prerequisite Digest::HMAC 1.00 not found.Warning: prerequisite Digest::SHA1 1.02 not found.

You can either install those modules as well, or continue without them.For our install, we do not need them, so we continue...

# make# make install

Install bb­xsnmp

Download the bb­xsnmp package from http://ww.deadcat.net

Copy the tar file to your BBHOME/ext dire.g.  # cp ./bb­xsnmp­1.77.tar.gz  /usr/local/bbc/ext# cd /usr/local/bbc/ext# gunzip ­c bb­xsnmp­1.77.tar.gz  | tar xf ­# cp  bb­xsnmp­1.77/bb­xsnmp.pl .# cp bb­xsnmp­1.77/bb­xsnmptab.DIST ../etc/bb­xsnmptab

Add an entry like this to your bb­config file for your BBDISPLAY server

ext_add:  bb­xsnmp.pl

e.g.host:        bbserver.mydomain.comip:           10.0.0.1ext_add:  bb­xsnmp.pl

Regenerate bb­*tab files# /usr/local/BBConfig/bin/bbconfigure

Edit /usr/local/bbc/etc/bb­xsnmptab

Page 60: Big Brother Installation and Configuration Guide

Add a line like this for each SNMP device you would like to monitor

cisco1.mydomain.com : public : cpu

Restart the Big Brother client$ /usr/local/bbc/runbb.sh restart

If you find errors of have comments about this document please contact us athttp://www.cookitservices.com


Top Related