[icinga-checkins] icinga.org: icinga-core/test/core: add last|next_check to orphaned check log output

git at icinga.org git at icinga.org
Fri Mar 8 22:31:26 CET 2013


Module: icinga-core
Branch: test/core
Commit: 0e70473742cc0524ccf5969494849b3e345cc5e4
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=0e70473742cc0524ccf5969494849b3e345cc5e4

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Fri Mar  8 17:04:24 2013 +0100

add last|next_check to orphaned check log output

---

 base/checks.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/base/checks.c b/base/checks.c
index 55112d9..f0ee03d 100644
--- a/base/checks.c
+++ b/base/checks.c
@@ -2143,9 +2143,12 @@ void check_for_orphaned_services(void) {
 		if (expected_time < current_time) {
 
 			/* log a warning */
-			logit(NSLOG_RUNTIME_WARNING, TRUE, "Warning: The check of service '%s' on host '%s' looks like it was orphaned (results never came back).  I'm scheduling an immediate check of the service...\n", temp_service->description, temp_service->host_name);
+			logit(NSLOG_RUNTIME_WARNING, TRUE, "Warning: The check of service '%s' on host '%s' looks like it was orphaned (results never came back; last_check=%lu; next_check=%lu).  I'm scheduling an immediate check of the service...\n", temp_service->description, temp_service->host_name, ctime(&temp_service->last_check), ctime(&temp_service->next_check));
 
 			log_debug_info(DEBUGL_CHECKS, 1, "Service '%s' on host '%s' was orphaned, so we're scheduling an immediate check...\n", temp_service->description, temp_service->host_name);
+            log_debug_info(DEBUGL_CHECKS, 1, "  next_check=%lu (%s); last_check=%lu (%s);\n",
+                    temp_service->next_check, ctime(&temp_service->next_check),
+                    temp_service->last_check, ctime(&temp_service->last_check));
 
 			/* decrement the number of running service checks */
 			if (currently_running_service_checks > 0)





More information about the icinga-checkins mailing list