mirror of https://github.com/Icinga/icinga2.git
add a bogus zero reply in livestatus if aggregate filter does not match, fix I#5626
refs #5716
This commit is contained in:
parent
89f905acef
commit
3a7c54c3d1
|
@ -571,6 +571,17 @@ void LivestatusQuery::ExecuteGetHelper(const Stream::Ptr& stream)
|
|||
|
||||
AppendResultRow(result, row, first_row);
|
||||
}
|
||||
|
||||
/* add a bogus zero value if aggregated is empty*/
|
||||
if (allStats.empty()) {
|
||||
Array::Ptr row = new Array();
|
||||
|
||||
for (size_t i = 1; i <= m_Aggregators.size(); i++) {
|
||||
row->Add(0);
|
||||
}
|
||||
|
||||
AppendResultRow(result, row, first_row);
|
||||
}
|
||||
}
|
||||
|
||||
EndResultSet(result);
|
||||
|
|
Loading…
Reference in New Issue