blob: 82cf6a115e97bef90b1f60407d95e4bd32f2c828 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# a simple nagios target to monitor
class nagios::target(
$parents = 'absent',
$address = $::ipaddress,
$nagios_alias = $::hostname,
$hostgroups = 'absent',
$use = 'generic-host',
){
@@nagios_host { $::fqdn:
address => $address,
alias => $nagios_alias,
use => $use,
}
if ($parents != 'absent') {
Nagios_host[$::fqdn] {
parents => $parents
}
}
if ($hostgroups != 'absent') {
Nagios_host[$::fqdn] {
hostgroups => $hostgroups
}
}
}
|