{
CONTEXT("GELF Processing check result for '" + checkable->GetName() + "'");
+ Log(LogDebug, "GelfWriter")
+ << "GELF Processing check result for '" << checkable->GetName() << "'";
+
Dictionary::Ptr fields = new Dictionary();
Service::Ptr service = dynamic_pointer_cast<Service>(checkable);
Host::Ptr host;
fields->Set("short_message", cr->GetOutput());
fields->Set("_type", "CHECK RESULT");
- SendLogMessage(ComposeGelfMessage(fields, "icinga"));
+ SendLogMessage(ComposeGelfMessage(fields, GetSource()));
}
void GelfWriter::NotificationToUserHandler(const Notification::Ptr& notification, const Checkable::Ptr& checkable,
fields->Set("_state", notification_type_str);
fields->Set("_comment", author_comment);
- SendLogMessage(ComposeGelfMessage(fields, "icinga"));
+ SendLogMessage(ComposeGelfMessage(fields, GetSource()));
}
void GelfWriter::StateChangeHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, StateType type)
fields->Set("_check_source", cr->GetCheckSource());
}
- SendLogMessage(ComposeGelfMessage(fields, "icinga"));
+ SendLogMessage(ComposeGelfMessage(fields, GetSource()));
}
String GelfWriter::ComposeGelfMessage(const Dictionary::Ptr& fields, const String& source)