OP#436 add full service details
This commit is contained in:
@@ -17,7 +17,7 @@ define confdroid_nagios::server::access (
|
||||
$ng_nagios_server = $confdroid_nagios::params::ng_nagios_server
|
||||
$ng_htpasswd_file = $confdroid_nagios::params::ng_htpasswd_file
|
||||
$ng_htpasswd_rule = $confdroid_nagios::params::ng_htpasswd_rule
|
||||
$ng_nagios_service = $confdroid_nagios::params::ng_nagios_service
|
||||
$ng_service = $confdroid_nagios::params::ng_service
|
||||
|
||||
if $fqdn == $ng_nagios_server {
|
||||
# create password rules
|
||||
|
||||
@@ -14,21 +14,7 @@ class confdroid_nagios::server::files (
|
||||
group => 'nagios',
|
||||
mode => '0644',
|
||||
content => template($ng_nagios_cfg_erb),
|
||||
notify => Service[$ng_nagios_service],
|
||||
notify => Service[$ng_service],
|
||||
}
|
||||
# custom cfg files
|
||||
## temp place holder, this will be done via defines
|
||||
## and PuppetDB exports and imports in the future
|
||||
#file { $ng_target_command:
|
||||
# ensure => file,
|
||||
# owner => 'nagios',
|
||||
# group => 'nagios',
|
||||
# mode => '0644',
|
||||
# selrange => s0,
|
||||
# selrole => object_r,
|
||||
# seltype => nagios_etc_t,
|
||||
# seluser => system_u,
|
||||
# notify => Service[$ng_nagios_service],
|
||||
#}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@ class confdroid_nagios::server::service (
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
service { $ng_nagios_service:
|
||||
service { $ng_service:
|
||||
ensure => running,
|
||||
name => $ng_nagios_service,
|
||||
name => $ng_service,
|
||||
enable => true,
|
||||
hasrestart => true,
|
||||
hasstatus => true,
|
||||
@@ -44,7 +44,7 @@ class confdroid_nagios::server::service (
|
||||
}
|
||||
|
||||
@@nagios_service { 'check_nagios_localhost':
|
||||
check_command => $ng_nagios_service_cmd,
|
||||
check_command => $ng_service_cmd,
|
||||
use => 'generic-service',
|
||||
host_name => 'localhost',
|
||||
notification_period => '24x7',
|
||||
@@ -197,7 +197,5 @@ class confdroid_nagios::server::service (
|
||||
Nagios_contactgroup <<||>> { notify => Service['nagios'] }
|
||||
Nagios_command <<||>> { notify => Service['nagios'] }
|
||||
Nagios_timeperiod <<||>> { notify => Service['nagios'] }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user