commit
1b9885f274
|
@ -647,42 +647,6 @@ class CommandPipe
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start obsessing over provided services/hosts
|
||||
*
|
||||
* @param array $objects An array of hosts and/or services
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop obsessing over provided services/hosts
|
||||
*
|
||||
* @param array $objects An array of hosts and/or services
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a custom host or service notification
|
||||
*
|
||||
|
|
|
@ -29,7 +29,7 @@ class ListControllerHostMySQLTest extends MonitoringControllerTest
|
|||
public function executeHostListTestFor($backend)
|
||||
{
|
||||
date_default_timezone_set('UTC');
|
||||
$checkTime = time()-2000;
|
||||
$checkTime = (string)(time()-2000);
|
||||
$fixture = new TestFixture();
|
||||
$firstHostFlags = ObjectFlags::PASSIVE_ONLY();
|
||||
$firstHostFlags->acknowledged = 1;
|
||||
|
|
Loading…
Reference in New Issue