summaryrefslogtreecommitdiff
path: root/manifests/service/dns.pp
blob: 715d9af3689efc343b7f7b88a826ba14886f47d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
define nagios::service::dns(
  $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           => $::fqdn,
      service_description => "check if ${::fqdn} is resolving ${check_domain}";
  }
}