blob: 5ef6e3e89891ed8d818e90a861ace5d34104d49f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
define nagios::service::dns(
$host_name = $::fqdn,
$comment = $name,
$check_domain = $name,
$ip
){
if $name != $comment {
$check_name = "${comment}_${name}_${::hostname}"
} else {
$check_name = "${name}_${::hostname}"
}
nagios::service{
$check_name:
check_command => "check_dns2!${check_domain}!${ip}",
host_name => $host_name,
service_description => "check if ${::host_name} is resolving ${check_domain}";
}
}
|