IcingaService: add use_agent

This commit is contained in:
Thomas Gelf 2015-12-18 11:07:23 +01:00
parent 59c17a5ddf
commit c03aaada92
3 changed files with 10 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class IcingaService extends IcingaObject
'icon_image' => null,
'icon_image_alt' => null,
'object_type' => null,
'use_agent' => null,
);
protected $relations = array(
@ -68,6 +69,11 @@ class IcingaService extends IcingaObject
return $this->renderRelationProperty('host', $this->host_id, 'host_name');
}
public function renderUse_agent()
{
return '';
}
protected function renderCheck_Interval()
{
return $this->renderPropertyAsSeconds('check_interval');

View File

@ -0,0 +1,3 @@
ALTER TABLE icinga_service
ADD COLUMN use_agent ENUM('y', 'n') NOT NULL DEFAULT 'n';

View File

@ -508,6 +508,7 @@ CREATE TABLE icinga_service (
icon_image VARCHAR(255) DEFAULT NULL,
icon_image_alt VARCHAR(255) DEFAULT NULL,
object_type ENUM('object', 'template', 'apply') NOT NULL,
use_agent ENUM('y', 'n') NOT NULL DEFAULT 'n',
PRIMARY KEY (id),
-- UNIQUE INDEX object_name (object_name, zone_id),
UNIQUE KEY object_key (object_name, host_id),