parent
029ff17cec
commit
1894054929
|
@ -645,6 +645,32 @@ class CommandPipe
|
|||
);
|
||||
}
|
||||
|
||||
public function startObsessing($objects)
|
||||
{
|
||||
foreach ($objects as $object) {
|
||||
$type = $this->getObjectType($object);
|
||||
$msg = "START_OBSESSING_OVER_". (($type == self::TYPE_SERVICE) ? 'SVC' : 'HOST');
|
||||
$msg .= ';'.$object->host_name;
|
||||
if ($type == self::TYPE_SERVICE) {
|
||||
$msg .= ';'.$object->service_description;
|
||||
}
|
||||
$this->send($msg);
|
||||
}
|
||||
}
|
||||
|
||||
public function stopObsessing($objects)
|
||||
{
|
||||
foreach ($objects as $object) {
|
||||
$type = $this->getObjectType($object);
|
||||
$msg = "STOP_OBSESSING_OVER_". (($type == self::TYPE_SERVICE) ? 'SVC' : 'HOST');
|
||||
$msg .= ';'.$object->host_name;
|
||||
if ($type == self::TYPE_SERVICE) {
|
||||
$msg .= ';'.$object->service_description;
|
||||
}
|
||||
$this->send($msg);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Start obsessing over provided services/hosts
|
||||
*
|
||||
|
|
|
@ -74,6 +74,7 @@ class PropertyModifier
|
|||
*/
|
||||
const FRESHNESS = "%s_FRESHNESS_CHECKS";
|
||||
|
||||
|
||||
/**
|
||||
* Template for enabling/disabling event handler
|
||||
*/
|
||||
|
@ -90,6 +91,7 @@ class PropertyModifier
|
|||
self::PASSIVE => self::STATE_KEEP,
|
||||
self::NOTIFICATIONS => self::STATE_KEEP,
|
||||
self::FRESHNESS => self::STATE_KEEP,
|
||||
self::OBSESSING => self::STATE_KEEP,
|
||||
self::EVENTHANDLER => self::STATE_KEEP
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue