Code: Select all
--- checks.c.orig 2014-03-15 10:12:57.000000000 -0400
+++ checks.c 2014-03-15 10:16:01.000000000 -0400
@@ -2085,7 +2085,16 @@
#ifdef USE_EVENT_BROKER
/* send data to event broker */
- broker_host_check(NEBTYPE_HOSTCHECK_INITIATE, NEBFLAG_NONE, NEBATTR_NONE, hst, CHECK_TYPE_ACTIVE, hst->current_state, hst->state_type, start_time, end_time, hst->check_command, hst->latency, 0.0, host_check_timeout, FALSE, 0, processed_command, NULL, NULL, NULL, NULL, cr);
+ neb_result = broker_host_check(NEBTYPE_HOSTCHECK_INITIATE, NEBFLAG_NONE, NEBATTR_NONE, hst, CHECK_TYPE_ACTIVE, hst->current_state, hst->state_type, start_time, end_time, hst->check_command, hst->latency, 0.0, host_check_timeout, FALSE, 0, processed_command, NULL, NULL, NULL, NULL, cr);
+
+ /* neb module wants to override the service check - perhaps it will check the service itself */
+ if(neb_result == NEBERROR_CALLBACKOVERRIDE) {
+ clear_volatile_macros_r(&mac);
+ hst->latency = old_latency;
+ free_check_result(cr);
+ my_free(processed_command);
+ return OK;
+ }
#endif
/* reset latency (permanent value for this check will get set later) */