#include "perfdata/gelfwriter.tcpp"
#include "icinga/service.hpp"
#include "icinga/notification.hpp"
+#include "icinga/checkcommand.hpp"
#include "icinga/macroprocessor.hpp"
#include "icinga/compatutility.hpp"
#include "base/tcpsocket.hpp"
fields->Set("_reachable", checkable->IsReachable());
+ CheckCommand::Ptr commandObj = checkable->GetCheckCommand();
+
+ if (commandObj)
+ fields->Set("_check_command", commandObj->GetName());
+
double ts = Utility::GetTime();
if (cr) {
if (service) {
fields->Set("_type", "SERVICE NOTIFICATION");
+ //TODO: fix this to _service_name
fields->Set("_service", service->GetShortName());
fields->Set("short_message", output);
} else {
fields->Set("_notification_type", notificationTypeString);
fields->Set("_comment", authorComment);
+ CheckCommand::Ptr commandObj = checkable->GetCheckCommand();
+
+ if (commandObj)
+ fields->Set("_check_command", commandObj->GetName());
+
SendLogMessage(ComposeGelfMessage(fields, GetSource(), ts));
}
fields->Set("_last_hard_state", host->GetLastHardState());
}
+ CheckCommand::Ptr commandObj = checkable->GetCheckCommand();
+
+ if (commandObj)
+ fields->Set("_check_command", commandObj->GetName());
+
double ts = Utility::GetTime();
if (cr) {