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

refs #4391
This commit is contained in:
Michael Friedrich 2013-07-06 20:46:09 +02:00
parent 80f899783a
commit 9249af1c66
1 changed files with 3 additions and 1 deletions

View File

@ -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) {