aboutsummaryrefslogtreecommitdiff
path: root/modules/profile/manifests/monitoring/hosts.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/profile/manifests/monitoring/hosts.pp')
-rw-r--r--modules/profile/manifests/monitoring/hosts.pp43
1 files changed, 43 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..306fe3e
--- /dev/null
+++ b/modules/profile/manifests/monitoring/hosts.pp
@@ -0,0 +1,43 @@
1class profile::monitoring::hosts {
2 $real_hostname = lookup("base_installation::real_hostname")
3
4 Nagios_hostgroup {
5 ensure => "present",
6 owner => "naemon",
7 group => "naemon",
8 target => "/etc/naemon/objects.cfg",
9 notify => Service["naemon"],
10 before => Service["naemon"],
11 }
12
13 Nagios_host {
14 ensure => "present",
15 owner => "naemon",
16 group => "naemon",
17 target => "/etc/naemon/objects.cfg",
18 notify => Service["naemon"],
19 before => Service["naemon"],
20 }
21
22 nagios_hostgroup { "linux-servers":
23 alias => "Linux Servers",
24 members => [$real_hostname],
25 }
26
27 $host_linux_server = {
28 check_command => "check-host-alive",
29 check_interval => 5,
30 check_period => "24x7",
31 contact_groups => "admins",
32 max_check_attempts => "10",
33 notification_interval => "120",
34 notification_options => "d,u,r",
35 retry_interval => "1",
36 }
37
38 nagios_host { $real_hostname:
39 address => $real_hostname;
40 default: * => $host_linux_server,
41 }
42
43}