[icinga-checkins] icinga.org: icinga2/master: log an error to debug when check_command not found on service execution

git at icinga.org git at icinga.org
Sat Jul 6 20:53:41 CEST 2013


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

Author: Michael Friedrich <Michael.Friedrich at netways.de>
Date:   Sat Jul  6 20:46:09 2013 +0200

log an error to debug when check_command not found on service execution

refs #4391

---

 lib/icinga/service-check.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/icinga/service-check.cpp b/lib/icinga/service-check.cpp
index 58600d3..f6ea309 100644
--- a/lib/icinga/service-check.cpp
+++ b/lib/icinga/service-check.cpp
@@ -698,8 +698,10 @@ void Service::ExecuteCheck(void)
 	try {
 		CheckCommand::Ptr command = GetCheckCommand();
 
-		if (!command)
+		if (!command) {
+			Log(LogDebug, "icinga", "No check_command found for service '" + GetName() + "'. Skipping execution.");
 			return;
+		}
 
 		result = command->Execute(GetSelf());
 	} catch (const std::exception& ex) {





More information about the icinga-checkins mailing list