diff --git a/plugins/mysql/mysql_slave_threads b/plugins/mysql/mysql_slave_threads index 6669c85d..47a2091d 100755 --- a/plugins/mysql/mysql_slave_threads +++ b/plugins/mysql/mysql_slave_threads @@ -24,6 +24,19 @@ use strict; my $MYSQL = $ENV{mysql} || "mysql"; my $MYSQLOPTS = $ENV{mysqlopts} || ""; +my $status = `$MYSQL $MYSQLOPTS -e 'SHOW SLAVE STATUS\\G'`; + +my $sqlerror = ""; +my $ioerror = ""; + +if ($status =~ /Last_SQL_Error: (.+)/) { + $sqlerror = $1; +} +if ($status =~ /Last_IO_Error: (.+)/) { + $ioerror = $1; +} + + if(defined $ARGV[0] && $ARGV[0] eq 'config') { print <