]>
Commit | Line | Data |
---|---|---|
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 | } |