IcingaConfig: Add v1-masterless config format
Do not render a passive checkable to the master zone then. refs #12919
This commit is contained in:
parent
31a321e13e
commit
802b923df6
|
@ -88,6 +88,7 @@ class SettingsForm extends QuickForm
|
|||
array(
|
||||
'v2' => $this->translate('Icinga v2.x'),
|
||||
'v1' => $this->translate('Icinga v1.x'),
|
||||
'v1-masterless' => $this->translate('Icinga v1.x (no master)'),
|
||||
)
|
||||
),
|
||||
'description' => $this->translate(
|
||||
|
|
|
@ -90,7 +90,7 @@ class IcingaConfig
|
|||
|
||||
public function isLegacy()
|
||||
{
|
||||
return $this->configFormat === 'v1';
|
||||
return strpos($this->configFormat, 'v1') === 0;
|
||||
}
|
||||
|
||||
public function getObjectCount()
|
||||
|
|
|
@ -1482,6 +1482,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
if (
|
||||
$this->getResolvedProperty('zone_id')
|
||||
&& array_key_exists('enable_active_checks', $this->defaultProperties)
|
||||
&& $config->getConfigFormat() !== 'v1-masterless'
|
||||
) {
|
||||
$passive = clone($this);
|
||||
$passive->enable_active_checks = false;
|
||||
|
|
Loading…
Reference in New Issue