Title: [opsview-base] [275] Possible fix for max concurrent check bomb
Revision
275
Author
tvoon
Date
2013-06-11 02:03:10 +0100 (Tue, 11 Jun 2013)

Log Message

Possible fix for max concurrent check bomb

Modified Paths


Added Paths

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2013-06-11 00:49:35 UTC (rev 274)
+++ trunk/Makefile	2013-06-11 01:03:10 UTC (rev 275)
@@ -643,6 +643,7 @@
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_worker_finish_timeout_commands_immediately.patch
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_disable_nagios_updates.patch
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_missing_host_variable_reset.patch
+	cd ${NAGIOS} && patch -p1 < ../patches/nagios_max_concurrent_decrements.patch
 	if [ $(KERNEL_NAME) = Linux ] ; then \
 		cd ${NAGIOS} && CFLAGS="${CFLAGS}" ./configure --with-nagios-user=$(NAGIOS_USER) --with-nagios-group=$(NAGIOS_GROUP) --with-command-group=$(NAGIOS_GROUP) --with-cgiurl=/cgi-bin --with-htmurl=/ --enable-libtap ; \
 	elif [ $(KERNEL_NAME) = Darwin ] ; then \

Added: trunk/patches/nagios_max_concurrent_decrements.patch
===================================================================
--- trunk/patches/nagios_max_concurrent_decrements.patch	                        (rev 0)
+++ trunk/patches/nagios_max_concurrent_decrements.patch	2013-06-11 01:03:10 UTC (rev 275)
@@ -0,0 +1,13 @@
+diff -ur nagios-4.0.20130107.original//base/checks.c nagios-4.0.20130107/base/checks.c
+--- nagios-4.0.20130107.original//base/checks.c	2013-06-10 10:20:21.000000000 +0000
++++ nagios-4.0.20130107/base/checks.c	2013-06-11 00:54:50.000000000 +0000
+@@ -323,6 +324,9 @@
+ 	runchk_result = wproc_run_check(cr, processed_command, &kvv);
+ 	if (runchk_result == ERROR) {
+ 		logit(NSLOG_RUNTIME_ERROR, TRUE, "Unable to run check for service '%s' on host '%s'\n", svc->description, svc->host_name);
++		// Opsview patch: need to decrement this here, as the job has not been setup and thus it cannot be reduced otherwise
++		if(currently_running_service_checks > 0)
++			currently_running_service_checks--;
+ 	}
+ 
+ 	/* free memory */

_______________________________________________
Opsview-checkins mailing list
Opsview-checkins@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to