Subject: Database Testing

From: "Jeremy Kister" <[email-masked]>
Date: Wed, 3 Mar 2004 15:35:30 -0500

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 ?

Jeremy Kister
www.jeremykister.com/jeremy/

---

From: Christopher Ferry <[email-masked]>
Date: 04 Mar 2004 15:48:32 -0500

I've been using the following check successfully:

                Service DB Replication {
                        frequency:      30
                        timeout:        120
                        retries:        2
                        retrydelay:     120
                        title:          MySQL Replication Status
                        label:          MySQL Replication Status
                        graph:          yes
                        drawgrid:       yes
                        ylabel:         Status
                        dsn:   
DBI:mysql:database=;host=dbhostname;port=3307
                        user:   youruser
                        pass:   yourpass
                        sql:    SHOW SLAVE STATUS
                        expect:  Yes
                        messagedn:  MySQL Replication Stopped!
                        notify: mail:[email-masked]
 }

Your db user should only have process privileges.

Thanks

Chris Ferry

On Wed, 2004-03-03 at 15:35, Jeremy Kister wrote:
> _______________________________________________
> http://argus.tcp4me.com/
> [email-masked]
> http://www.tcp4me.com/mailman/listinfo/arguslist