aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-07-11 12:18:18 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-07-11 12:19:26 +0200
commit21d531ee2e4a5952673d694342ff01822581a1f8 (patch)
treee5c4118c42401206ff12a2f1a2b6a537c51922de /modules
parent7e8517ec66c39c508142aad729deca96b58d560a (diff)
downloadPuppet-21d531ee2e4a5952673d694342ff01822581a1f8.tar.gz
Puppet-21d531ee2e4a5952673d694342ff01822581a1f8.tar.zst
Puppet-21d531ee2e4a5952673d694342ff01822581a1f8.zip
Add service group per host
Diffstat (limited to 'modules')
-rw-r--r--modules/profile/manifests/monitoring/local_service.pp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/profile/manifests/monitoring/local_service.pp b/modules/profile/manifests/monitoring/local_service.pp
index 1f975f0..4d38d69 100644
--- a/modules/profile/manifests/monitoring/local_service.pp
+++ b/modules/profile/manifests/monitoring/local_service.pp
@@ -24,6 +24,11 @@ define profile::monitoring::local_service (
24 }) 24 })
25 } 25 }
26 26
27 $service_group = "${::profile::monitoring::params::service_local[host_name]}-servicegroup"
28 ensure_resource("nagios_servicegroup", $service_group, {
29 target => $::profile::monitoring::params::services_for_master,
30 })
31
27 [true, false].each |$services_for_master| { 32 [true, false].each |$services_for_master| {
28 if $services_for_master { 33 if $services_for_master {
29 $default_local = { 34 $default_local = {
@@ -33,6 +38,7 @@ define profile::monitoring::local_service (
33 retry_interval => $::profile::monitoring::params::service_local["retry_interval"], 38 retry_interval => $::profile::monitoring::params::service_local["retry_interval"],
34 host_name => $::profile::monitoring::params::service_local["host_name"], 39 host_name => $::profile::monitoring::params::service_local["host_name"],
35 use => $::profile::monitoring::params::service_types["passive"], 40 use => $::profile::monitoring::params::service_types["passive"],
41 servicegroups => $service_group,
36 notify => [], 42 notify => [],
37 } 43 }
38 $t = "master - " 44 $t = "master - "