mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 07:14:35 +02:00
parent
7ba6d4a74f
commit
584198f00c
@ -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
|
* Send a custom host or service notification
|
||||||
*
|
*
|
||||||
|
@ -29,7 +29,7 @@ class ListControllerHostMySQLTest extends MonitoringControllerTest
|
|||||||
public function executeHostListTestFor($backend)
|
public function executeHostListTestFor($backend)
|
||||||
{
|
{
|
||||||
date_default_timezone_set('UTC');
|
date_default_timezone_set('UTC');
|
||||||
$checkTime = time()-2000;
|
$checkTime = (string)(time()-2000);
|
||||||
$fixture = new TestFixture();
|
$fixture = new TestFixture();
|
||||||
$firstHostFlags = ObjectFlags::PASSIVE_ONLY();
|
$firstHostFlags = ObjectFlags::PASSIVE_ONLY();
|
||||||
$firstHostFlags->acknowledged = 1;
|
$firstHostFlags->acknowledged = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user