[hobbit] If dbcheck slow mode activated, XYmon becomes purple

Francesco Duranti fduranti at q8.it
Thu Mar 19 01:42:59 CET 2009


I think there's some misunderstanding on how dbcheck will work (it's probably my fault I'm not really good at English and also not really good at writing documentation :).

First of all you've to use dbcheck as hobbit test and not something else like dbfast or dbslow because this will only define what host will be checked, nothing more. So you will have this in you bb-hosts file:
group-compress Dev DB
  0.0.0.0 db1 #   noconn dbcheck
  0.0.0.0 db2 #   noconn dbcheck
  0.0.0.0 db3 #   noconn dbcheck
  0.0.0.0 db4 #   noconn dbcheck	

Then you will define the interval you will run fast and slow check (if you want you can also run medium-length check with dbcheck.pl medium). For example you can run fast check every 5 minutes and slow check every 2 hours in this way:
 [dbfast]
         ENVFILE /home/bb/server/etc/hobbitserver.cfg
         NEEDS hobbitd
         CMD $BBHOME/ext/dbcheck.pl fast
         LOGFILE $BBSERVERLOGS/bb-dbfast.log
         INTERVAL 5m
[dbslow]
         ENVFILE /home/bb/server/etc/hobbitserver.cfg
         NEEDS hobbitd
         CMD $BBHOME/ext/dbcheck.pl slow
         LOGFILE $BBSERVERLOGS/bb-dbslow.log
         INTERVAL 120m

In this case every 5 minutes and every 2 hours the dbcheck.pl will be called but with a different paramenters. 
So what's a fast or a slow check? It's something you've to define in the dbcheck.ini file (if you don't like the default).
The default is:
fast for ChkConn, Audit, TblSpace, HitCache, MemReq, InvObj, Locks, Sessions
slow for Extent, RollBack

This implies that if you don't change the configuration every 5 minutes the fast check will run and every 2 hours only the slow check will run with the exception of ChkConn (the connection check) that will run always (because it will simply check the connection status to the database).

Normally you can define what are your fast checks and what are your slow checks in the default section of the dbcheck.ini so, if you for example want to define the InvObj as a slow check (because you don't want to run it every 5 minutes but it's ok for you tu run it every 2 hours) you can define it in the dbcheck.ini in this way:

bbinvobjcolumn          = InvObj::Slow
If you don't want to run the locks check on the database you can define it like:
bblockscolumn           = Locks::notest

The definition in the [default] section of the dbcheck.ini file is valid for all database but you can change it later for a specific database. 
For example you can run the MemReq as slow for db1 and db3 and don't check for InvObj for db3 in this way:
[db1]
dbtype                  = Oracle
sid                     = dbsid
username                = username
password                = password
bbmemreqcolumn = MemReq::Slow
[db3]
dbtype                  = Oracle
sid                     = dbsid
username                = username
password                = password
bbmemreqcolumn = MemReq::Slow 
bbinvobjcolumn = InvObj::notest

So at the end if you want to run tests only in "slow" call of dbcheck for a database you have to define all the test with "::slow" in the specific database configuration. Normally I think you would like at least to test the database for connection/tablespace/sessions every 5 minutes so that if you have a problem (connection, space problems or session running out) you're immediately informed.

The locks, extent and rollback checks can be really time and resource consuming so they can run in a slow configuration.

Remember to define the time the checks are valid in the dbcheck.ini and use a time bigger than the interval+runtime (normally at least 2 time the interval is good but also a higher interval can be good). I use this and I run fast check every 5 minutes and slow checks every 2 hours:
fastcheck               = 30m
mediumcheck             = 2h
slowcheck               = 6h

I think this is almost all regarding how to define the checks to be done by dbcheck.

I hope this helped to clarify a bit the lacks in the documentation of dbcheck :)
Let me know if this helped :)

Francesco


-----Original Message-----
From: L.M.J [mailto:linuxmasterjedi at free.fr] 
Sent: Monday, March 16, 2009 9:07 AM
To: hobbit at hswn.dk
Subject: RE: [hobbit] If dbcheck slow mode activated, XYmon becomes purple


Hi,

On Fri, 13 Mar 2009 19:40:45 +0100, Francesco Duranti <fduranti at q8.it>
wrote:
> Hi, the fast/medium/slow check are related to what check you will do (and
> not the time you do them).
> 
> This is my configuration on checks on the dbcheck.ini
> bbconncolumn            = ChkConn::fast
> bbauditcolumn           = Audit::fast
> bbtablespacecolumn      = TblSpace::fast
> bbextentcolumn          = Extent::slow
> bbhitcachecolumn        = HitCache::fast
> bbmemreqcolumn          = MemReq::fast
> bbrollbackcolumn        = RollBack::slow
> bbinvobjcolumn          = InvObj::fast
> bblockscolumn           = Locks::fast
> bbsessioncolumn         = Session::fast
> 
> For example I use them to differentiate the checks on the same databases
> In hobbitlaunch I have:
> [dbfast]
>         ENVFILE /home/bb/server/etc/hobbitserver.cfg
>         NEEDS hobbitd
>         CMD $BBHOME/ext/dbcheck.pl fast
>         LOGFILE $BBSERVERLOGS/bb-dbfast.log
>         INTERVAL 5m
> [dbslow]
>         ENVFILE /home/bb/server/etc/hobbitserver.cfg
>         NEEDS hobbitd
>         CMD $BBHOME/ext/dbcheck.pl slow
>         LOGFILE $BBSERVERLOGS/bb-dbslow.log
>         INTERVAL 120m
> 
> So [dbfast] will run only checks defined as "fast" in the dbcheck.ini
> files every 5 minutes while [dbslow] will run every 2 hours to check
Extent
> and Rollback (those kind of checks are more impegnative on the Database
and
> take a long times on some of the database I check).
> 
> On the bb-hosts file I've:
> group-compress Dev DB
> 0.0.0.0 db1 #   noconn dbcheck
> 0.0.0.0 db2 #   noconn dbcheck
> 0.0.0.0 db3 #   noconn dbcheck
> 0.0.0.0 db4 #   noconn dbcheck

Did you mean something like this : 
 group-compress Dev DB
  0.0.0.0 db1 #   noconn dbfast
  0.0.0.0 db2 #   noconn dbslow
  0.0.0.0 db3 #   noconn dbfast
  0.0.0.0 db4 #   noconn dbslow	
 
Put dbslow or dbfast instead of dbcheck ?

To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk




More information about the Xymon mailing list