summaryrefslogtreecommitdiff
path: root/build-nagios
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2005-10-04 12:03:59 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2005-10-04 12:03:59 +0000
commit84b79fb7ab439abbe9054a47c3d706adee83db19 (patch)
tree08ccaffa1c9bfe79d4cbb3c9b1a1b9f35b8a0fcd /build-nagios
parentcbaabdc7e5636ae4a40ed5fd864d66912c36f037 (diff)
Catch missing hostgroup def
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@22 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'build-nagios')
-rwxr-xr-xbuild-nagios1
1 files changed, 1 insertions, 0 deletions
diff --git a/build-nagios b/build-nagios
index 2d46742..d6f1548 100755
--- a/build-nagios
+++ b/build-nagios
@@ -75,6 +75,7 @@ config['hostgroups'].each_value{ |hg|
config['servers'].each_pair{ |name, server|
server['hostgroups'].split(/,/).each{ |hg|
hg.strip!
+ throw "Hostgroup #{hg} is not defined" unless config['hostgroups'].has_key?(hg)
config['hostgroups'][hg]['members'] << name
};
}