Database Testing

Jeremy Kister argus-01 at jeremykister.com
Fri Mar 5 12:07:56 EST 2004


On Thu Mar 4 15:48:32 EST 2004, Christopher Ferry wrote:
> I've been using the following check successfully:
[...]
>                        sql:    SHOW SLAVE STATUS
>                        expect:  Yes

I dont know how much testing you've done with this config, but your
implementation will yeild false positives (ie argus will say all is ok when
all is not ok)

If the socket between the master and slave is ok, but there is a sql
transactional error, your test will pass.

Possibilities are:
Yes Yes
Yes No
No No

at the very minimum you should be using "expect: Yes Yes" (for the socket +
SQL), but there is a question of that breaking too, as the sql server does
not always return the same amount of rows while executing 'show slave
status'; I dont know how different amount of rows would effect the
positioning of each value, if at all.

An evil co-worker could also easily foil the method, as he could start
replicating (or ignoring) a database named "Yes" (or "Yes Yes") -- 
admittedly unlikely.  You'd also have to ensure neither your master nor
slave have 'Yes' in the hostname nor username -- again, unlikely.



Jeremy Kister
www.jeremykister.com/jeremy/



More information about the Arguslist mailing list