summaryrefslogtreecommitdiff
path: root/build-nagios
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2005-10-04 12:25:23 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2005-10-04 12:25:23 +0000
commit7848dc464b0cc3a4a38b83934a6ce665bec6a782 (patch)
tree13c3c97c071d4c3933a1aff998e454b5dd3edefa /build-nagios
parent84b79fb7ab439abbe9054a47c3d706adee83db19 (diff)
Allow per hostgroup contacts
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@23 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'build-nagios')
-rwxr-xr-xbuild-nagios3
1 files changed, 2 insertions, 1 deletions
diff --git a/build-nagios b/build-nagios
index d6f1548..405f564 100755
--- a/build-nagios
+++ b/build-nagios
@@ -108,10 +108,11 @@ config['servers'].each_pair{ |name, server|
f = File.new(GENERATED_PREFIX+"auto-hostgroups.cfg", "w")
config['hostgroups'].each_pair{ |name, hg|
next if hg['private']
+ hg['contact_groups'] = CONTACTGROUP unless hg.has_key?('contact_groups')
f.puts "define hostgroup{"
f.puts " hostgroup_name #{ name }"
f.puts " alias #{ hg['alias'] }"
- f.puts " contact_groups #{ CONTACTGROUP }"
+ f.puts " contact_groups #{ hg['contact_groups'] }"
f.puts " members "+hg['members'].join(",")
f.puts "}"
}