diff options
author | mh <mh@immerda.ch> | 2012-11-21 23:24:32 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2012-11-21 23:24:32 +0100 |
commit | 4ed37d2c584fb2ab7edf715bbdf135264b80ae07 (patch) | |
tree | f61ab68a57d3ac83a72e50dc0da0652f72aeb789 /manifests/service | |
parent | bf6856e3b55e2353efc3c2c0fcd278aa0018521d (diff) |
add dns check
Diffstat (limited to 'manifests/service')
-rw-r--r-- | manifests/service/dns.pp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/manifests/service/dns.pp b/manifests/service/dns.pp new file mode 100644 index 0000000..715d9af --- /dev/null +++ b/manifests/service/dns.pp @@ -0,0 +1,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}"; + } +} |