diff --git a/modules/monitoring/application/controllers/HealthController.php b/modules/monitoring/application/controllers/HealthController.php index 1614e72e0..999ea99aa 100644 --- a/modules/monitoring/application/controllers/HealthController.php +++ b/modules/monitoring/application/controllers/HealthController.php @@ -93,6 +93,7 @@ class HealthController extends Controller $this->view->programStatus = $programStatus; $toggleFeaturesForm = new ToggleInstanceFeaturesCommandForm(); $toggleFeaturesForm + ->setBackend($this->backend) ->setStatus($programStatus) ->load($programStatus) ->handleRequest(); diff --git a/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php b/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php index 6e6ae83d3..ed50466fe 100644 --- a/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php +++ b/modules/monitoring/application/forms/Command/Instance/ToggleInstanceFeaturesCommandForm.php @@ -138,7 +138,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm ) ); - if (! preg_match('~^v2\.\d+\.\d+.*$~', $this->status->program_version)) { + if (! $this->getBackend()->isIcinga2($this->status->program_version)) { $this->addElement( 'checkbox', ToggleInstanceFeatureCommand::FEATURE_HOST_OBSESSING,