diff options
Diffstat (limited to 'modules/profile/manifests/monitoring/local_service.pp')
-rw-r--r-- | modules/profile/manifests/monitoring/local_service.pp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/profile/manifests/monitoring/local_service.pp b/modules/profile/manifests/monitoring/local_service.pp index 3b39d1f..0caf72e 100644 --- a/modules/profile/manifests/monitoring/local_service.pp +++ b/modules/profile/manifests/monitoring/local_service.pp | |||
@@ -1,4 +1,5 @@ | |||
1 | define profile::monitoring::local_service ( | 1 | define profile::monitoring::local_service ( |
2 | Optional[Hash] $sudos = {}, | ||
2 | Optional[Hash] $common = {}, | 3 | Optional[Hash] $common = {}, |
3 | Optional[Hash] $master = {}, | 4 | Optional[Hash] $master = {}, |
4 | Optional[Hash] $local = {}, | 5 | Optional[Hash] $local = {}, |
@@ -6,6 +7,15 @@ define profile::monitoring::local_service ( | |||
6 | $service_description = $title | 7 | $service_description = $title |
7 | $real_hostname = lookup("base_installation::real_hostname") | 8 | $real_hostname = lookup("base_installation::real_hostname") |
8 | 9 | ||
10 | Nagios_service { | ||
11 | ensure => "present", | ||
12 | owner => "naemon", | ||
13 | group => "naemon", | ||
14 | notify => Service["naemon"], | ||
15 | before => Service["naemon"], | ||
16 | require => File["/etc/naemon"], | ||
17 | } | ||
18 | |||
9 | $service_generic = { | 19 | $service_generic = { |
10 | active_checks_enabled => "1", | 20 | active_checks_enabled => "1", |
11 | check_freshness => "0", | 21 | check_freshness => "0", |
@@ -35,6 +45,12 @@ define profile::monitoring::local_service ( | |||
35 | retry_interval => "1", | 45 | retry_interval => "1", |
36 | }) | 46 | }) |
37 | 47 | ||
48 | $sudos.each |$sudo_name, $content| { | ||
49 | sudo::conf { $sudo_name: | ||
50 | content => $content, | ||
51 | before => Nagios_service[$service_description], | ||
52 | } | ||
53 | } | ||
38 | 54 | ||
39 | [true, false].each |$services_for_master| { | 55 | [true, false].each |$services_for_master| { |
40 | if $services_for_master { | 56 | if $services_for_master { |