From 868937c848ee6e761aa46b186ddd355e7c62f16e Mon Sep 17 00:00:00 2001 From: Colin Mollenhour Date: Thu, 16 Oct 2014 14:34:50 -0400 Subject: [PATCH] Report properly when value is undefined (slave error). --- plugins/mysql/mysql_slave | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/mysql/mysql_slave b/plugins/mysql/mysql_slave index b94d4581..5541a44a 100755 --- a/plugins/mysql/mysql_slave +++ b/plugins/mysql/mysql_slave @@ -65,9 +65,11 @@ my $seconds = 0; my (@infos,$info,$i_seconds); my $info = `$COMMAND`; -$info =~ /: (\d+)/; - -print("seconds.value $1\n"); +if($info =~ /: (\d+)/) { + print("seconds.value $1\n"); +} else { + print("seconds.value U\n"); +} sub print_config {