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

31 lines
709 B
PHP
Raw Normal View History

2013-07-12 14:33:17 +02:00
<?php
namespace Icinga\Module\Monitoring\Object;
2013-07-12 14:33:17 +02:00
use Icinga\Module\Monitoring\DataView\ServiceStatus;
2013-07-12 14:33:17 +02:00
class Service extends AbstractObject
{
public $type = self::TYPE_SERVICE;
public $prefix = 'service_';
private $view = null;
2013-07-12 14:33:17 +02:00
public function populate()
2013-07-12 14:33:17 +02:00
{
$this->fetchComments()
->fetchDowntimes()
->fetchHostgroups()
->fetchServicegroups()
2013-07-12 14:33:17 +02:00
->fetchContacts()
->fetchContactGroups()
->fetchCustomvars();
2013-07-12 14:33:17 +02:00
}
protected function getProperties()
2013-07-12 14:33:17 +02:00
{
$this->view = ServiceStatus::fromRequest($this->getRequest());
return $this->view->getQuery()->fetchRow();
2013-07-12 14:33:17 +02:00
}
}