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.
This commit is contained in:
Matt N
2018-08-19 22:48:08 -07:00
committed by GitHub
parent 361603aed5
commit ec612f9d10

View File

@@ -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) {