Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 4529f7e

Browse files
author
Bret Martin
committed
Switch heartbeat support from maatkit to Percona Toolkit.
1 parent 22d236f commit 4529f7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mysql-snmp

+1-1
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ sub fetch_mysql_data {
735735

736736
# Check replication heartbeat, if present.
737737
if ( $opt{heartbeat} ne '' ) {
738-
my $row2 = $dbh->selectrow_arrayref("SELECT GREATEST(0, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(ts) - 1) FROM $opt{heartbeat} WHERE id = 1");
738+
my $row2 = $dbh->selectrow_arrayref("SELECT GREATEST(0, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(ts) - 1) FROM $opt{heartbeat} WHERE server_id != \@\@SERVER_ID ORDER BY ts DESC LIMIT 1");
739739
$status{'slave_lag'} = $row2->[0];
740740
}
741741

0 commit comments

Comments
 (0)