Merge pull request #9072 from Icinga/feature/icingadb-scheduling_source-2.13

Make CheckResult#scheduling_source available to Icinga DB
This commit is contained in:
Noah Hilverling 2021-11-10 16:47:52 +01:00 committed by GitHub
commit c1c2135df1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1568,6 +1568,8 @@ void IcingaDB::SendStateChange(const ConfigObject::Ptr& object, const CheckResul
xAdd.emplace_back(Utility::ValidateUTF8(std::move(output)));
xAdd.emplace_back("check_source");
xAdd.emplace_back(cr->GetCheckSource());
xAdd.emplace_back("scheduling_source");
xAdd.emplace_back(cr->GetSchedulingSource());
}
if (service) {
@ -2216,6 +2218,7 @@ Dictionary::Ptr IcingaDB::SerializeState(const Checkable::Ptr& checkable)
attrs->Set("execution_time", TimestampToMilliseconds(fmax(0.0, cr->CalculateExecutionTime())));
attrs->Set("latency", TimestampToMilliseconds(cr->CalculateLatency()));
attrs->Set("check_source", cr->GetCheckSource());
attrs->Set("scheduling_source", cr->GetSchedulingSource());
}
attrs->Set("is_problem", checkable->GetProblem());