MCPcopy Create free account
hub / github.com/Icinga/icinga2 / FetchRows

Method FetchRows

lib/livestatus/statehisttable.cpp:242–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242void StateHistTable::FetchRows(const AddRowFunction& addRowFn)
243{
244 Log(LogDebug, "StateHistTable")
245 << "Pre-selecting log file from " << m_TimeFrom << " until " << m_TimeUntil;
246
247 /* create log file index */
248 LivestatusLogUtility::CreateLogIndex(m_CompatLogPath, m_LogFileIndex);
249
250 /* generate log cache */
251 LivestatusLogUtility::CreateLogCache(m_LogFileIndex, this, m_TimeFrom, m_TimeUntil, addRowFn);
252
253 Checkable::Ptr checkable;
254
255 for (const auto& kv : m_CheckablesCache) {
256 for (Dictionary::Ptr state_hist_bag : kv.second) {
257 /* pass a dictionary from state history array */
258 if (!addRowFn(state_hist_bag, LivestatusGroupByNone, Empty))
259 return;
260 }
261 }
262}
263
264Object::Ptr StateHistTable::HostAccessor(const Value& row, const Column::ObjectAccessor&)
265{

Callers

nothing calls this directly

Calls 1

LogClass · 0.85

Tested by

no test coverage detected