diff options
author | mh <mh@immerda.ch> | 2012-11-23 09:53:13 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2012-11-23 09:53:13 +0100 |
commit | a42cd0d304acf3e73c6a0d8b9c580fd503afe09a (patch) | |
tree | 1dc9cbf74301b5419c9b9bc5e41c0bc6b7b9fc48 | |
parent | 4ed37d2c584fb2ab7edf715bbdf135264b80ae07 (diff) |
add new wrapper for dns hosts
-rw-r--r-- | manifests/service/dns.pp | 9 | ||||
-rw-r--r-- | manifests/service/dns_host.pp | 19 |
2 files changed, 24 insertions, 4 deletions
diff --git a/manifests/service/dns.pp b/manifests/service/dns.pp index 715d9af..5ef6e3e 100644 --- a/manifests/service/dns.pp +++ b/manifests/service/dns.pp @@ -1,6 +1,7 @@ define nagios::service::dns( - $comment = $name, - $check_domain = $name, + $host_name = $::fqdn, + $comment = $name, + $check_domain = $name, $ip ){ if $name != $comment { @@ -12,7 +13,7 @@ define nagios::service::dns( nagios::service{ $check_name: check_command => "check_dns2!${check_domain}!${ip}", - host_name => $::fqdn, - service_description => "check if ${::fqdn} is resolving ${check_domain}"; + host_name => $host_name, + service_description => "check if ${::host_name} is resolving ${check_domain}"; } } diff --git a/manifests/service/dns_host.pp b/manifests/service/dns_host.pp new file mode 100644 index 0000000..b103350 --- /dev/null +++ b/manifests/service/dns_host.pp @@ -0,0 +1,19 @@ +define nagios::service::dns_host( + $host_alias, + $parent, + $ip +){ + nagios_host{$name: + address => $ip, + alias => $host_alias, + use => 'generic-host', + parents => $parent, + } + + nagios::service::dns{ + $host_name => $name, + $comment => 'public_ns', + $check_domain => 'glei.ch', + $ip => $ip, + } +} |