diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-07-11 09:31:24 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-07-11 09:31:24 +0200 |
commit | 2bdbb0213a0f70705f81ac2eaf8349668b2c29b4 (patch) | |
tree | 06b1e40db99815133dcc40e3e68531d45e1bd228 /modules/profile/manifests/monitoring/hosts.pp | |
parent | 25c99a635507abfe6af4a1f0a9fc5a103d1880c0 (diff) | |
parent | d8bc769648c1528f5d749deee060d70e326ef431 (diff) | |
download | Puppet-2bdbb0213a0f70705f81ac2eaf8349668b2c29b4.tar.gz Puppet-2bdbb0213a0f70705f81ac2eaf8349668b2c29b4.tar.zst Puppet-2bdbb0213a0f70705f81ac2eaf8349668b2c29b4.zip |
Merge branch 'monitoring' into dev
Diffstat (limited to 'modules/profile/manifests/monitoring/hosts.pp')
-rw-r--r-- | modules/profile/manifests/monitoring/hosts.pp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/modules/profile/manifests/monitoring/hosts.pp b/modules/profile/manifests/monitoring/hosts.pp new file mode 100644 index 0000000..f7802be --- /dev/null +++ b/modules/profile/manifests/monitoring/hosts.pp | |||
@@ -0,0 +1,45 @@ | |||
1 | class profile::monitoring::hosts inherits profile::monitoring::params { | ||
2 | $real_hostname = lookup("base_installation::real_hostname") | ||
3 | |||
4 | Nagios_hostgroup { | ||
5 | ensure => "present", | ||
6 | owner => "naemon", | ||
7 | group => "naemon", | ||
8 | target => $objects, | ||
9 | notify => Service["naemon"], | ||
10 | before => Service["naemon"], | ||
11 | require => File["/etc/naemon"], | ||
12 | } | ||
13 | |||
14 | Nagios_host { | ||
15 | ensure => "present", | ||
16 | owner => "naemon", | ||
17 | group => "naemon", | ||
18 | target => $objects, | ||
19 | notify => Service["naemon"], | ||
20 | before => Service["naemon"], | ||
21 | require => File["/etc/naemon"], | ||
22 | } | ||
23 | |||
24 | nagios_hostgroup { "linux-servers": | ||
25 | alias => "Linux Servers", | ||
26 | members => [$real_hostname], | ||
27 | } | ||
28 | |||
29 | $host_linux_server = { | ||
30 | check_command => "check-host-alive", | ||
31 | check_interval => 5, | ||
32 | check_period => "24x7", | ||
33 | contact_groups => "admins", | ||
34 | max_check_attempts => "10", | ||
35 | notification_interval => "120", | ||
36 | notification_options => "d,u,r", | ||
37 | retry_interval => "1", | ||
38 | } | ||
39 | |||
40 | nagios_host { $real_hostname: | ||
41 | address => $real_hostname; | ||
42 | default: * => $host_linux_server, | ||
43 | } | ||
44 | |||
45 | } | ||