HealthCommand: compare overall numeric state...

...not the object itself
This commit is contained in:
Thomas Gelf 2017-11-09 10:10:26 +01:00
parent a133706996
commit c5bbc5a1fa

View File

@ -50,7 +50,7 @@ class HealthCommand extends Command
$output[] = $check->getOutput();
}
if ($state === 0) {
if ($state->getNumeric() === 0) {
echo "Icinga Director: everything is fine\n\n";
} else {
echo "Icinga Director: there are problems\n\n";