X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=build-nagios;h=e7bc540041fc3ba769f186e337452c63e1a8a22c;hb=12a40d4e650ec7ffe25c05bae79a429cf0c4a3d4;hp=9d7541bb7d05062fce43ed9af8a67239aaee0bc2;hpb=da547572939d8456d6e41352b65ebec70b2009a0;p=mirror%2Fdsa-nagios.git diff --git a/build-nagios b/build-nagios index 9d7541b..e7bc540 100755 --- a/build-nagios +++ b/build-nagios @@ -9,7 +9,7 @@ SHORTORG="dsa" GENERATED_PREFIX="./generated/" nagios_filename = {}; -%w(hosts hostgroups services dependencies hostextinfo serviceextinfo).each{ +%w(hosts hostgroups services dependencies hostextinfo serviceextinfo servicegroups).each{ |x| nagios_filename[x] = GENERATED_PREFIX+"auto-#{x}.cfg" } nagios_filename['nrpe'] = GENERATED_PREFIX+"nrpe_#{ ORG }.cfg" @@ -279,6 +279,8 @@ config['servers'].each_pair{ |name, server| }; } +config['servicegroups'] = {} unless config.has_key? 'servicegroups' + ############## # HOSTS ############## @@ -404,6 +406,17 @@ config['services'].each{ |service| } + +############## +# SERVICEGROUPS +############## +config['servicegroups'].each_pair{ |name, sg| + set_complain_if_set sg, 'servicegroup_name', name , 'Servicegroup', name + + print_block files['servicegroups'], 'servicegroup', sg, %w() +} + + ############## # NRPE config file ##############