diff --git a/application/controllers/SelfServiceController.php b/application/controllers/SelfServiceController.php index b58e3014..986760da 100644 --- a/application/controllers/SelfServiceController.php +++ b/application/controllers/SelfServiceController.php @@ -268,7 +268,8 @@ class SelfServiceController extends ActionController 'fetch_agent_name' => $settings->get('self-service/agent_name') === 'hostname', 'fetch_agent_fqdn' => $settings->get('self-service/agent_name') === 'fqdn', 'transform_hostname' => $transform, - 'flush_api_directory' => $settings->get('self-service/flush_api_dir') === 'y' + 'flush_api_directory' => $settings->get('self-service/flush_api_dir') === 'y', + 'ConvertEndpointIPConfig' => '0', ]; $username = $settings->get('self-service/icinga_service_user'); if (strlen($username)) { diff --git a/application/forms/SelfServiceSettingsForm.php b/application/forms/SelfServiceSettingsForm.php index e89af4ce..c309dea7 100644 --- a/application/forms/SelfServiceSettingsForm.php +++ b/application/forms/SelfServiceSettingsForm.php @@ -39,6 +39,19 @@ class SelfServiceSettingsForm extends DirectorForm ], 'value' => $settings->getStoredOrDefaultValue('self-service/transform_hostname') ]); + $this->addElement('select', 'transform_parent_host', [ + 'label' => $this->translate('Transform Parent Host to IP'), + 'description' => $this->translate( + 'This is only important in case your master/satellite nodes do not' + . ' have IP addresses as their "host" property. The Agent can be' + . ' told to issue related DNS lookups on it\' own' + ), + 'multiOptions' => [ + '0' => $this->translate("Don't care, my host settings are fine"), + '1' => $this->translate('My Agents should use DNS to look up Endpoint names'), + ], + 'value' => $settings->getStoredOrDefaultValue('self-service/transform_parent_host') + ]); $this->addElement('extensibleSet', 'global_zones', [ 'label' => $this->translate('Global Zones'), diff --git a/library/Director/Settings.php b/library/Director/Settings.php index 59cef445..fc0778be 100644 --- a/library/Director/Settings.php +++ b/library/Director/Settings.php @@ -11,23 +11,25 @@ class Settings protected $cache; protected $defaults = [ - 'default_global_zone' => 'director-global', - 'icinga_package_name' => 'director', - 'magic_apply_for' => '_director_apply_for', /* @deprecated to be removed in 1.8.0 #1850 #1851 */ - 'config_format' => 'v2', - 'override_services_varname' => '_override_servicevars', - 'override_services_templatename' => 'host var overrides (Director)', - 'disable_all_jobs' => 'n', // 'y' - 'enable_audit_log' => 'n', - 'deployment_mode_v1' => 'active-passive', - 'deployment_path_v1' => null, - 'activation_script_v1' => null, - 'self-service/agent_name' => 'fqdn', - 'self-service/transform_hostname' => '0', - 'self-service/global_zones' => ['director-global'], - 'ignore_bug7530' => 'n', - // 'experimental_features' => null, // 'allow' - // 'master_zone' => null, + 'default_global_zone' => 'director-global', + 'icinga_package_name' => 'director', + /* @deprecated to be removed in 1.8.0 #1850 #1851 */ + 'magic_apply_for' => '_director_apply_for', + 'config_format' => 'v2', + 'override_services_varname' => '_override_servicevars', + 'override_services_templatename' => 'host var overrides (Director)', + 'disable_all_jobs' => 'n', // 'y' + 'enable_audit_log' => 'n', + 'deployment_mode_v1' => 'active-passive', + 'deployment_path_v1' => null, + 'activation_script_v1' => null, + 'self-service/agent_name' => 'fqdn', + 'self-service/transform_hostname' => '0', + 'self-service/transform_parent_host' => '0', + 'self-service/global_zones' => ['director-global'], + 'ignore_bug7530' => 'n', + // 'experimental_features' => null, // 'allow' + // 'master_zone' => null, ]; protected $jsonEncode = [