OP#410 fix hostname

This commit is contained in:
12ww1160
2026-02-03 01:28:38 +01:00
parent 3a0137ff09
commit 30fc8ffad7
2 changed files with 10 additions and 4 deletions

View File

@@ -10,12 +10,12 @@ class confdroid_apache::monitoring::target (
false: { notify { 'Nagios Service target for check_httpd has been disabled via parameters / ENC override': }
}
default: {
@@nagios_service { "check_http_${::hostname}":
@@nagios_service { "check_http_${fqdn}":
check_command => 'check_http',
use => 'generic-service',
host_name => $::fqdn,
host_name => $fqdn,
notification_period => '24x7',
service_description => "${::hostname}_check_http",
service_description => "${fqdn}_check_http",
target => $ae_target_service,
owner => 'nagios',
group => 'nagios',

View File

@@ -55,7 +55,7 @@ class confdroid_apache::params (
Boolean $ae_allow_user_dirs = false,
# nagios
Boolean $ae_incl_target = true,
Boolean $ae_incl_target = false,
String $ae_target_service = '/etc/nagios/conf.d/httpd_service.cfg',
# firewall
@@ -65,6 +65,12 @@ class confdroid_apache::params (
String $ae_https_port = '443',
) {
# facts
$fqdn = $facts['networking']['fqdn']
$domain = $facts['networking']['domain']
$os_name = $facts['os']['name']
$os_release = $facts['os']['release']['major']
# service
$ae_service = 'httpd'