spooling event in BB

Why spooling event ?

As bb is installed on all our server, we use it to collect information for different purpose (store event in a rdbms after treatment, keep them in another directory, ...)

In a first time we've used the way used by larrd (parse each 5 minutes the bbvar/logs directory) but that's not a good idea as :

Now, we use this method for one year and we are very happy :-).

How it works

Installing this patch

  1. download last spool files ;
  2. save your bb/src/ ;
  3. untar it in bb/src/ ;
  4. patch your bbd.c :
    patch < bbd.c.spool
    
  5. rebuild and install :
    $ make
    $ make install
    
  6. define the SPOOL env var in bbinc.sh for example. Add for example in bbinc.sh just after the BBVAR definition :
    BBVAR=$BBTOP/bbvar
    # If you want a different BBVAR just modify the next line and uncomment
    # BBVAR=/some/directory/structure
    
    BBLOGS="${BBVAR}/logs"     # WHERE THE LOG FILES LIVE
    BBHISTLOGS="${BBVAR}/histlogs"   # WHERE THE HISTLOG FILES LIVE
    BBHIST="${BBVAR}/hist"     # WHERE THE HIST FILES LIVE
    BBDATA="${BBVAR}/data"     # WHERE THE DATA FILES LIVE (data message type)
    BBACKS="${BBVAR}/acks"     # WHERE THE ACKS/NOTIF LOGS  LIVE
    BBDISABLED="${BBVAR}/disabled"   # WHERE THE DISABLE TAG FILES  LIVE
    
    export BB BBHOSTS BBDFTAB BBCPUTAB BBPROCTAB BBEXTTAB BBMSGSTAB BBNOTES
    export BBREP BBTOP BBVAR BBLOGS BBHISTLOGS BBHIST BBDATA BBACKS BBDISABLED
    
    BBSPOOL="${BBVAR}/spool"              # ADD THIS LINE
    export BBSPOOL                        # AND THIS ONE
    
    and create this directory.
  7. restart bb.

Using it

Author, suggestion

Nicolas Chuche

All suggestions welcome

Even if we use it for one year, this patch is provided as-is...