summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2005-10-10 23:45:10 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2005-10-10 23:45:10 +0000
commite7d7606f3af730446e8209a938a8dc0c1b453861 (patch)
treed0bab905741fc516a918ceaa38c10b13699b67be
parent9f001770b66566ea33540a859267cfe59d1cdd4f (diff)
Copy all unknown fields in host definitions to resulting hostgroup definitions
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@25 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-xbuild-nagios6
1 files changed, 4 insertions, 2 deletions
diff --git a/build-nagios b/build-nagios
index 27e542c..2de7513 100755
--- a/build-nagios
+++ b/build-nagios
@@ -124,9 +124,11 @@ config['hostgroups'].each_pair{ |name, hg|
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 #{ hg['contact_groups'] }"
f.puts " members "+hg['members'].join(",")
+ hg.each_pair{ |key, value|
+ next if %w(members).include? key
+ f.puts " #{key} #{value}"
+ }
f.puts "}"
}