From: Greg Sabino Mullane Date: Wed, 9 Feb 2011 18:36:06 +0000 (-0500) Subject: Better perfdata trailing semicolon cleanup. X-Git-Tag: 2.18.0~84 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=974cd7007ef6271a1f43c11498df73c52faa6a07;p=check_postgres.git Better perfdata trailing semicolon cleanup. --- diff --git a/check_postgres.pl b/check_postgres.pl index d8f4773f3..5a75800b4 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -1087,7 +1087,8 @@ sub add_response { $perf .= sprintf '%s%s', length($perf) ? ' ' : '', $db->{perf}; } ## Strip trailing semicolons as allowed by the Nagios spec - $perf =~ s/[; ]+$//; + $perf =~ s/; / /; + $perf =~ s/;$//; push @{$type->{$header}} => [$msg,$perf]; return;