From d3ccc499a19d3c6134c82975f7c72d2240b50d23 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Wed, 13 Jun 2012 08:29:04 +0100 Subject: [PATCH] add load to dependencies for nrpe checks Signed-off-by: Stephen Gran --- config/build-nagios | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/build-nagios b/config/build-nagios index 1eb3977..50a182a 100755 --- a/config/build-nagios +++ b/config/build-nagios @@ -46,6 +46,7 @@ HOST_TEMPLATE_NAME='generic-host' # host templates that all our host de SERVICE_TEMPLATE_NAME='generic-service' # host templates that all our host definitions use HOST_ALIVE_CHECK='check-host-alive' # host alive check if server is pingable NRPE_PROCESS_SERVICE='process - nrpe' # nrpe checks will depend on this one +NRPE_LOAD_CHECK='load' def warn (msg) @@ -168,7 +169,12 @@ def addService(hosts, service, files, servers) service['check_command'] = "#{ NRPE_CHECKNAME }!#{ check }" service['depends'] = ensure_array( service['depends'] ) - service['depends'] << NRPE_PROCESS_SERVICE unless service['service_description'] == NRPE_PROCESS_SERVICE # Depend on NRPE unless we are it + unless service['service_description'] == NRPE_PROCESS_SERVICE + # Depend on the load check to reduce noise + service['depends'] << NRPE_LOAD_CHECK unless service['service_description'] == NRPE_LOAD_CHECK + # Depend on NRPE unless we are it + service['depends'] << NRPE_PROCESS_SERVICE + end end hosts.each{ |host| -- 2.20.1