mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
RedisWriter: add icinga:{state:stream:*,history:stream:*:state}#check_source
This commit is contained in:
parent
f314489d23
commit
8613365f1c
@ -1187,6 +1187,7 @@ void RedisWriter::SendStatusUpdate(const ConfigObject::Ptr& object, const CheckR
|
|||||||
"last_hard_state", Convert::ToString(service ? service->GetLastHardState() : host->GetLastHardState()),
|
"last_hard_state", Convert::ToString(service ? service->GetLastHardState() : host->GetLastHardState()),
|
||||||
"output", Utility::ValidateUTF8(std::move(output.first)),
|
"output", Utility::ValidateUTF8(std::move(output.first)),
|
||||||
"long_output", Utility::ValidateUTF8(std::move(output.second)),
|
"long_output", Utility::ValidateUTF8(std::move(output.second)),
|
||||||
|
"check_source", cr->GetCheckSource(),
|
||||||
"max_check_attempts", Convert::ToString(checkable->GetMaxCheckAttempts()),
|
"max_check_attempts", Convert::ToString(checkable->GetMaxCheckAttempts()),
|
||||||
"event_id", Utility::NewUniqueID(),
|
"event_id", Utility::NewUniqueID(),
|
||||||
"event_type", "state"
|
"event_type", "state"
|
||||||
@ -1596,6 +1597,7 @@ Dictionary::Ptr RedisWriter::SerializeState(const Checkable::Ptr& checkable)
|
|||||||
attrs->Set("commandline", FormatCommandLine(cr->GetCommand()));
|
attrs->Set("commandline", FormatCommandLine(cr->GetCommand()));
|
||||||
attrs->Set("execution_time", TimestampToMilliseconds(cr->CalculateExecutionTime()));
|
attrs->Set("execution_time", TimestampToMilliseconds(cr->CalculateExecutionTime()));
|
||||||
attrs->Set("latency", TimestampToMilliseconds(cr->CalculateLatency()));
|
attrs->Set("latency", TimestampToMilliseconds(cr->CalculateLatency()));
|
||||||
|
attrs->Set("check_source", cr->GetCheckSource());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isProblem = !checkable->IsStateOK(checkable->GetStateRaw());
|
bool isProblem = !checkable->IsStateOK(checkable->GetStateRaw());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user