icingaweb2/modules/monitoring/library/Monitoring/Object/Service.php

31 lines
713 B
PHP

<?php
namespace Icinga\Module\Monitoring\Object;
use Icinga\Data\BaseQuery as Query;
use Icinga\Module\Monitoring\DataView\ServiceStatus;
class Service extends AbstractObject
{
public $type = self::TYPE_SERVICE;
public $prefix = 'service_';
private $view = null;
public function populate()
{
$this->fetchComments()
->fetchDowntimes()
->fetchHostgroups()
->fetchServicegroups()
->fetchContacts()
->fetchContactGroups();
}
protected function getProperties()
{
$this->view = ServiceStatus::fromRequest($this->getRequest());
return $this->view->getQuery()->fetchRow();
}
}