]>
Commit | Line | Data |
---|---|---|
0363f38e | 1 | class profile::monitoring::hosts inherits profile::monitoring::params { |
d8f933bd IB |
2 | $real_hostname = lookup("base_installation::real_hostname") |
3 | ||
4 | Nagios_hostgroup { | |
69624636 IB |
5 | ensure => "present", |
6 | owner => "naemon", | |
7 | group => "naemon", | |
0363f38e | 8 | target => $objects, |
69624636 IB |
9 | notify => Service["naemon"], |
10 | before => Service["naemon"], | |
11 | require => File["/etc/naemon"], | |
d8f933bd IB |
12 | } |
13 | ||
14 | Nagios_host { | |
69624636 IB |
15 | ensure => "present", |
16 | owner => "naemon", | |
17 | group => "naemon", | |
0363f38e | 18 | target => $objects, |
69624636 IB |
19 | notify => Service["naemon"], |
20 | before => Service["naemon"], | |
21 | require => File["/etc/naemon"], | |
d8f933bd IB |
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 | } |