Icinga DB Check: ignore suppressed queries in Redis backlog check

If some kind of query is not supposed to be processed at the moment, there is
little point in checking it. During a full dump, state updates are suppressed
(i.e. delayed), so when a dump takes very long, this would have resulted in a
false Redis backlog warning.
This commit is contained in:
Julian Brost 2022-06-28 11:30:48 +02:00 committed by Julian Brost
parent 5550fb713c
commit 4f125753bf
1 changed files with 1 additions and 1 deletions

View File

@ -250,7 +250,7 @@ double RedisConnection::GetOldestPendingQueryTs()
double oldest = 0; double oldest = 0;
for (auto& queue : m_Queues.Writes) { for (auto& queue : m_Queues.Writes) {
if (!queue.second.empty()) { if (m_SuppressedQueryKinds.find(queue.first) == m_SuppressedQueryKinds.end() && !queue.second.empty()) {
auto ctime (queue.second.front().CTime); auto ctime (queue.second.front().CTime);
if (ctime < oldest || oldest == 0) { if (ctime < oldest || oldest == 0) {