RedisWriter: drop icinga:history:stream:notification#{,long_}output and add #{author,text}

This commit is contained in:
Alexander A. Klimov 2019-10-23 15:57:30 +02:00 committed by Michael Friedrich
parent badcb5662c
commit 617a4a2e92

View File

@ -1237,7 +1237,6 @@ void RedisWriter::SendSentNotification(
return; return;
auto service (dynamic_pointer_cast<Service>(checkable)); auto service (dynamic_pointer_cast<Service>(checkable));
auto output (SplitOutput(cr->GetOutput()));
std::vector<String> xAdd ({ std::vector<String> xAdd ({
"XADD", "icinga:history:stream:notification", "*", "XADD", "icinga:history:stream:notification", "*",
@ -1248,8 +1247,8 @@ void RedisWriter::SendSentNotification(
"send_time", Convert::ToString(TimestampToMilliseconds(Utility::GetTime())), "send_time", Convert::ToString(TimestampToMilliseconds(Utility::GetTime())),
"state", Convert::ToString(cr->GetState()), "state", Convert::ToString(cr->GetState()),
"previous_hard_state", Convert::ToString(GetPreviousHardState(checkable, service)), "previous_hard_state", Convert::ToString(GetPreviousHardState(checkable, service)),
"output", Utility::ValidateUTF8(std::move(output.first)), "author", Utility::ValidateUTF8(author),
"long_output", Utility::ValidateUTF8(std::move(output.second)), "text", Utility::ValidateUTF8(text),
"users_notified", Convert::ToString(users), "users_notified", Convert::ToString(users),
"event_id", Utility::NewUniqueID(), "event_id", Utility::NewUniqueID(),
"event_type", "notification" "event_type", "notification"