Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #20 from hubspotdevops/master

Support Percona Toolkit
  • Loading branch information...
commit 926f5e4b3af9e7339f2b623fdb4a691d1d721714 2 parents 22d236f + 45ee6f9
@masterzen authored
Showing with 6 additions and 4 deletions.
  1. +2 −2 README
  2. +1 −1  mysql-snmp
  3. +3 −1 mysql-snmp.1
View
4 README
@@ -70,12 +70,12 @@ On all platform, the configuration is done with command line arguments:
-h|--host HOST connect to mysql HOST
-P|--port PORT port to connect to (default 3306)
-u|--user DBUSER use DBUSER as user to connect to mysql
--p|--passwordi DBPASS use DBPASS as password to connect to mysql
+-p|--password DBPASS use DBPASS as password to connect to mysql
-c|--config FILE read MySQL configuration from FILE
-m|--master check master
-s|--slave check slave
--b|--heartbeat DB.TABLE table for maatkit mk-heartbeat
+-b|--heartbeat DB.TABLE table for Percona Toolkit pt-heartbeat
--oid OID registering OID
-l|--process-list|--procs
enable the MySQL process list
View
2  mysql-snmp
@@ -735,7 +735,7 @@ sub fetch_mysql_data {
# Check replication heartbeat, if present.
if ( $opt{heartbeat} ne '' ) {
- my $row2 = $dbh->selectrow_arrayref("SELECT GREATEST(0, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(ts) - 1) FROM $opt{heartbeat} WHERE id = 1");
+ 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");
$status{'slave_lag'} = $row2->[0];
}
View
4 mysql-snmp.1
@@ -76,7 +76,9 @@ adds SNMP counters for slaves
.TP
.B \-b,\-\-heartbeat DB.TABLE
-compute slave lag with the maatkit mk-heartbeat stamp table.
+compute slave lag with the Percona Toolkit pt-heartbeat stamp
+table. (Note that this option has no effect if \-\-slave is not also
+specified.)
.TP
.B \-\-oid OID
Please sign in to comment.
Something went wrong with that request. Please try again.