Module: check_mk
Branch: master
Commit: 608b4e143dc92597075748df964079f6a0f53450
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=608b4e143dc925…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Nov 8 14:42:58 2017 +0100
Hackily reconstruct time range filter for EC.
Change-Id: I00c8dcc9537e36375f59580745a73b0893acd76e
---
livestatus/src/TableEventConsole.cc | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/livestatus/src/TableEventConsole.cc b/livestatus/src/TableEventConsole.cc
index 107f31a..afec50b 100644
--- a/livestatus/src/TableEventConsole.cc
+++ b/livestatus/src/TableEventConsole.cc
@@ -24,6 +24,7 @@
#include "TableEventConsole.h"
#include <algorithm>
+#include <ctime>
#include <iosfwd>
#include <iostream>
#include <memory>
@@ -54,6 +55,17 @@ private:
os << " " << c->name();
}
}
+ // HACK: Reconstruct time range filter
+ auto end = time(nullptr) + 1;
+ int since = 0;
+ int until = end;
+ _query->findIntLimits("history_time", &since, &until);
+ if (since != 0) {
+ os << "\nFilter: history_time >= " << since;
+ }
+ if (until != end) {
+ os << "\nFilter: history_time <= " << until - 1;
+ }
os << std::endl;
}