[icinga-checkins] icinga.org: icinga2/master: Remove duplicate last_check runtime macro

git at icinga.org git at icinga.org
Thu Jun 16 17:40:34 CEST 2016


Module: icinga2
Branch: master
Commit: b4c56e5f475dcc296cb2aba1c0fcf56059f1dc90
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=b4c56e5f475dcc296cb2aba1c0fcf56059f1dc90

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Thu Jun 16 17:39:59 2016 +0200

Remove duplicate last_check runtime macro

Already available as {host,service}.last_check attribute.

refs #11483

---

 lib/icinga/host.cpp    |    3 ---
 lib/icinga/service.cpp |    3 ---
 2 files changed, 6 deletions(-)

diff --git a/lib/icinga/host.cpp b/lib/icinga/host.cpp
index dd166aa..af6cab8 100644
--- a/lib/icinga/host.cpp
+++ b/lib/icinga/host.cpp
@@ -300,9 +300,6 @@ bool Host::ResolveMacro(const String& macro, const CheckResult::Ptr&, Value *res
 		} else if (macro == "perfdata") {
 			*result = PluginUtility::FormatPerfdata(cr->GetPerformanceData());
 			return true;
-		} else if (macro == "last_check") {
-			*result = cr->GetScheduleStart();
-			return true;
 		} else if (macro == "check_source") {
 			*result = cr->GetCheckSource();
 			return true;
diff --git a/lib/icinga/service.cpp b/lib/icinga/service.cpp
index fd233f0..80f166f 100644
--- a/lib/icinga/service.cpp
+++ b/lib/icinga/service.cpp
@@ -230,9 +230,6 @@ bool Service::ResolveMacro(const String& macro, const CheckResult::Ptr& cr, Valu
 		} else if (macro == "perfdata") {
 			*result = PluginUtility::FormatPerfdata(cr->GetPerformanceData());
 			return true;
-		} else if (macro == "last_check") {
-			*result = cr->GetExecutionEnd();
-			return true;
 		} else if (macro == "check_source") {
 			*result = cr->GetCheckSource();
 			return true;



More information about the icinga-checkins mailing list