]>
Commit | Line | Data |
---|---|---|
d8f933bd IB |
1 | class 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 | } |