mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2025-12-24 00:29:47 -05:00
Node: clear missing when setting state
This commit is contained in:
parent
14e30e4741
commit
98bd02c164
2 changed files with 8 additions and 1 deletions
|
|
@ -334,7 +334,13 @@ class BpNode extends Node
|
||||||
foreach ($this->getChildren() as $child) {
|
foreach ($this->getChildren() as $child) {
|
||||||
$bp->beginLoopDetection($this->name);
|
$bp->beginLoopDetection($this->name);
|
||||||
if ($child instanceof MonitoredNode && $child->isMissing()) {
|
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();
|
$sort_states[] = $child->getSortingState();
|
||||||
$lastStateChange = max($lastStateChange, $child->getLastStateChange());
|
$lastStateChange = max($lastStateChange, $child->getLastStateChange());
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,7 @@ abstract class Node
|
||||||
public function setState($state)
|
public function setState($state)
|
||||||
{
|
{
|
||||||
$this->state = (int) $state;
|
$this->state = (int) $state;
|
||||||
|
$this->missing = false;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue