[icinga-checkins] icinga.org: icinga2/feature/threadpool-bug-5050: Fix latency calculation.

git at icinga.org git at icinga.org
Fri Nov 15 14:27:01 CET 2013


Module: icinga2
Branch: feature/threadpool-bug-5050
Commit: 1666f701a50a6779f4990baffd40b907ddc1f2eb
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=1666f701a50a6779f4990baffd40b907ddc1f2eb

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Fri Nov 15 14:26:38 2013 +0100

Fix latency calculation.

Refs #5050

---

 lib/icinga/service-check.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/icinga/service-check.cpp b/lib/icinga/service-check.cpp
index 796a2bc..1ae61aa 100644
--- a/lib/icinga/service-check.cpp
+++ b/lib/icinga/service-check.cpp
@@ -459,6 +459,7 @@ void Service::ExecuteCheck(void)
 	}
 
 	/* keep track of scheduling info in case the check type doesn't provide its own information */
+	double scheduled_start = GetNextCheck();
 	double before_check = Utility::GetTime();
 
 	Service::Ptr self = GetSelf();
@@ -491,7 +492,7 @@ void Service::ExecuteCheck(void)
 
 	if (result) {
 		if (!result->GetScheduleStart() == 0)
-			result->SetScheduleStart(before_check);
+			result->SetScheduleStart(scheduled_start);
 
 		if (!result->GetScheduleEnd() == 0)
 			result->SetScheduleEnd(after_check);





More information about the icinga-checkins mailing list