diff --git a/library/Businessprocess/BpNode.php b/library/Businessprocess/BpNode.php index 32a88a0..ef13384 100644 --- a/library/Businessprocess/BpNode.php +++ b/library/Businessprocess/BpNode.php @@ -334,7 +334,13 @@ class BpNode extends Node foreach ($this->getChildren() as $child) { $bp->beginLoopDetection($this->name); if ($child instanceof MonitoredNode && $child->isMissing()) { - $child->setState(self::ICINGA_UNKNOWN); + if ($child instanceof HostNode) { + $child->setState(self::ICINGA_UNREACHABLE); + } else { + $child->setState(self::ICINGA_UNKNOWN); + } + + $child->setMissing(); } $sort_states[] = $child->getSortingState(); $lastStateChange = max($lastStateChange, $child->getLastStateChange()); diff --git a/library/Businessprocess/Node.php b/library/Businessprocess/Node.php index b46046d..7396eb9 100644 --- a/library/Businessprocess/Node.php +++ b/library/Businessprocess/Node.php @@ -143,6 +143,7 @@ abstract class Node public function setState($state) { $this->state = (int) $state; + $this->missing = false; return $this; }