BBMAP : Big Brother Status Map

BBMAP is a set of PHP pages (mainly) that tend to give a status map capacity to Big Brother.


Current version V2.5 (27/11/2006).

REQUIREMENT

DOWNLOAD

INSTALLATION

HOWTO CREATE MINIMAL (BB)RELAY

REQUIREMENT

Well, I've done that with PHP/GD and the Great Help of Henrik Storner (bbgen author)!
As usual, you have the right to use it, modify it, distribute it as long as you let my name with the product. For me, under GPL ! You need the following:

Of course, there could be some bugs and/or compatibility issues. As far as I know, it works under IE 5 and next, Netscape 4.79 and Mozilla 0.99 (tested). Under Netscape 4.79, it seems that javascript doesn't work for color select, but this is not mandatory since it can set manually too through the interface. The detailed status when moving the mouse on one host in the map is working now on all platform. Not tested on Opera (someone can ?).
There will not be any problem with the BB4 configuration (meaning that if something goes wrong, it will be only with the map feature, not with BB4 since nothing is done inside BB4 itself).
(frederic bregier : )

DOWNLOAD

You can download version V2.4 from here the tar.gz package for BigBrother, or the version V2.5 from here the tar.gz package for Hobbit.
The only difference between these two versions is that the first one support BigBrother and the second one support Hobbit by the package given by Daniel J McDonald. See the following page to see what is the patch that was applied.
You can download picture part (V2.1 since it should not change) from here the tar.gz package for picture only .

Here is the main idea of these scripts:

INSTALLATION

                bbmap/admin/ directory   to same file in bbmap/
                globalmap.cfg
                initiate.php
                initiatesubmap.php
                initpostserial.php
                maparea.php
                redirect.php
                serialize.php
                sjava.php
                status.php
                statussubmap.php
                map (to the directory bbmap/map)


Done!

It is not so simple, I agree. You need to try a bit to understand how to use it, but I tried to make as easy as possible, and as configurable as possible.
 

Whenever you're going into problem, here are some quick help points:

          error_reporting(E_ERROR);
	  by
	  error_reporting(E_ERROR|E_WARNING|E_PARSE|E_CORE_ERROR|E_CORE_WARNING|E_ALL);


	  Then take a look at the log of PHP, generaly in /var/log/php.log 
	  (see your php.ini to find where your log file is)
	  Generally, you will find a lot of info to understand why it is not working as expected.
    


In order to get security access after every map are configured (TRY THIS AFTER GETTING BBMAP WORKING):



You can also use bbgen only for bbmap (that is to say not for your bb4 kernel). Of course, I will not encourage this since bbgen seems to be a really good improvement of the bbdisplay part of BB4. But, however, some user still wants to use the "official" way so here is the point to get bbmap working :

HOWTO CREATE MINIMAL (BB)RELAY

As a BBRELAY would do, the BBMAP (also BBDISPLAY so running bbd) will receive only the status of servers.services if there are any changes and only for those changes. That is to say it's an evenemential send and not the usual way BB4 does. The interest is to keep low the bandwith required if you have a lot of servers.services on the network and you still want to be informed of what is going on. The status sent is very short (server.service status date_time #base address of the original BBDISPLAY).
Of course, pay attention that bb4/etc/security allows your main BBDISPLAY server to receive from those BBDISPLAY hosts.
This way is not "compatible" with BB4 standard way of doing (no modification of bb-hosts required) so don't expect to have your normal BB4 displaying the result for all of your servers. It will not break your BB4 hopefully !
This way enables you to have the BBMAP able to see any server.services you want, if you have the right to. BBMAP then uses bbgen to generate the BB4 web page and the color point will transport you to the original BBDISPLAY (so that's why we don't need to send the full status).
Finally, someone can do something close (perhaps with bbgen) to produce directly BB4 web pages with this new feature.
Now here is the way to install it for BBMAP.
  1. On a "sub" BBDISPLAY (not the BBMAP one), put the scripts statusget.sh and statusloop.sh (from bbmap/RELAY) into bb4/ext and adapt them to reflect your organization
    Mainly, replace:
    1. In statusloop.sh: /usr/local/bb4/ext/statusget.sh by the right place where you put this script (can be anywhere).
    2. In statusget.sh: FINALHOST="w.x.y.z" by the IP addresse of the BBMAP master server and LASTCHKDIR="/usr/local/bb4/tmp/" by the location of a TEMPORARY directory with write access (here the bb4 tmp directory but can be anywhere).
    3. Modify statusloop.sh if needed (for instance the sleep delay)
    4. Add the file LASTCOUNT.txt in the LASTCHKDIR directory with a 0 inside ("echo 0 > LASTCOUNT.txt") with write access for the bb4 user
    5. Create LCKCONFIG.txt in BBHOME/etc/ (according to the CONFIGFILE variable) with one line by host assumed by the current BBDISPLAY following by a list of services as below:
      host1:service1,service2,service3
      host2:service2,service4
      ...
      where hostx = name of host as in bbhost and servicex as in bbweb page (not as in bbhost) for instance service = conn or oracle or cpu...
    6. Then add the following command: "/whereyouplacedthescrip/statusloop.sh > /dev/null 2>&1  &" either in the bbrun.sh or anywhere as you convenience or execute it by hand as bbuser.
  2. On the main BBDISPLAY server (BBRELAY one or hypervision)
    1. check security in bb4/etc/security to allow sub-BBDISPLAYs to send status to this one
    2. stop here for bbmap (more exactly, now start to configure a map)
    3. or by hand, here is a way to start with using bbgen to create your own web page
      1. creating a particular bb-host file as you want. For instance here is what bbmap produces:
        group-only service1|service2|service3 your_groupname
        0.0.0.0 host1
        0.0.0.0 host2
        ...
      2. running such commands
        BBHOSTS=yourfile
        export BBHOSTS
        TEMPLATE="your_template_if_different_than_standard"
        ${BBHOME}/bin/bbgen --template=${TEMPLATE} --embedded > your_page.html
      3. this will produce web page as needed but you will need to take care about the html link (see status.php for what bbmap is doing to correct th web links)