summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 "}"
}