mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-04 01:09:25 -05:00
cli/check: return unknown on process failures
This commit is contained in:
parent
fe5181052f
commit
f9b9d9645a
1 changed files with 8 additions and 0 deletions
|
|
@ -45,6 +45,14 @@ class CheckCommand extends Command
|
|||
|
||||
$node = $bp->getNode($this->params->shift());
|
||||
$bp->retrieveStatesFromBackend();
|
||||
if ($bp->hasErrors()) {
|
||||
printf(
|
||||
"Checking Business Process %s failed: %s\n",
|
||||
$node->getAlias(),
|
||||
implode("\n", $bp->getErrors())
|
||||
);
|
||||
exit(3);
|
||||
}
|
||||
printf("Business Process %s: %s\n", $node->getStateName(), $node->getAlias());
|
||||
exit($node->getState());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue