From ec612f9d10927e3bec39501ee0702839b7487e30 Mon Sep 17 00:00:00 2001 From: Matt N Date: Sun, 19 Aug 2018 22:48:08 -0700 Subject: [PATCH] Always define STATUS_* variables in status monitoring messages The corresponding IF- variables also wouldn't be defined either so there was no way to avoid literal STATUS_* output for monitors which didn't provide useful values for these variables. --- status/monitor.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/status/monitor.pl b/status/monitor.pl index 4955022af..f472d9ed4 100755 --- a/status/monitor.pl +++ b/status/monitor.pl @@ -518,7 +518,7 @@ if ($tmpl && $tmpl->{$type}) { } if ($stat) { foreach my $k ('value', 'nice_value', 'desc') { - $hash{'STATUS_'.uc($k)} = $stat->{$k} if ($stat->{$k}); + $hash{'STATUS_'.uc($k)} = $stat->{$k} ? $stat->{$k} : ""; } } foreach my $k (keys %$serv) {