Database Testing
Jeff Weisberg
jaw+arguslist at tcp4me.com
Wed Mar 3 16:26:58 EST 2004
| I am currently monitoring the health of my two slave MySQL servers via some
| perl:
| my $sql = 'show slave status';
| my $sth = $dbh->prepare($sql);
| $sth->execute;
| my $row=$sth->fetchrow_hashref;
| my $slave_io = $row->{Slave_IO_Running};
| my $slave_sql = $row->{Slave_SQL_Running};
|
| print "OK" if(($slave_io eq 'Yes') && ($slave_sql eq 'Yes'));
|
| how can this be monitored from Argus's internal Database Testing Technique ?
I don't know enough about mysql to know what 'show slave status' returns,
but I'd probably do something like:
Service DB {
user: jkister
pass: alyssa
dsn: dbi:mysql:host=db.example.com;database=mydb
sql: show slave status
}
then I'd start up my web browser, and look at the 'debugging' page
for the service and look at 'db::rbuffer' to figure out what mysql
was returning. then I'd add the appropriate 'expect' to my config.
--jeff
More information about the Arguslist
mailing list