From: Greg Sabino Mullane Date: Wed, 16 Jul 2008 22:19:42 +0000 (-0400) Subject: Fix version action: only output mrtg if in that mode. X-Git-Tag: 2.9.0~282 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=dc38e55ff46ce391da42ddccfa6bacc2a89dd920;p=check_postgres.git Fix version action: only output mrtg if in that mode. --- diff --git a/check_postgres.pl b/check_postgres.pl index 40442751e..57276503d 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2944,7 +2944,7 @@ sub check_version { if (length $critical) { if (($critfull and $critical ne $full) or (!$critfull and $critical ne $version)) { - do_mrtg({one => 0, msg => $full}); + $MRTG and do_mrtg({one => 0, msg => $full}); add_critical qq{version $full, but expected $critical}; $ok = 0; } @@ -2952,13 +2952,13 @@ sub check_version { elsif (length $warning) { if (($warnfull and $warning ne $full) or (!$warnfull and $warning ne $version)) { - do_mrtg({one => 0, msg => $full}); + $MRTG and do_mrtg({one => 0, msg => $full}); add_warning qq{version $full, but expected $warning}; $ok = 0; } } if ($ok) { - do_mrtg({one => 1, msg => $full}); + $MRTG and do_mrtg({one => 1, msg => $full}); add_ok "version $full"; } }