Closed yu-re-ka closed 8 months ago
Patch by @n0emis
diff --git a/deploy/dashboards/NetMeta_Overview.cue b/deploy/dashboards/NetMeta_Overview.cue
index 42cff43..bbd0662 100644
--- a/deploy/dashboards/NetMeta_Overview.cue
+++ b/deploy/dashboards/NetMeta_Overview.cue
@@ -65,17 +65,20 @@ _trafficStatisticQueries: {
"""#
"Top 100 Next Hop":
#"""
- SELECT
+ SELECT time, NextHop, BitsPerSecond
+ FROM
+ (SELECT
$__timeInterval(TimeReceived) as time,
NextHop,
- (sum(Bytes * SamplingRate) * 8 / $__interval_s) AS BitsPerSecond
+ (sum(Bytes * SamplingRate) * 8 / $__interval_s) AS BitsPerSecond,
+ row_number() over (partition by time order by BitsPerSecond DESC) as row_num
FROM flows_raw
WHERE $__timeFilter(TimeReceived)
\#(_filtersWithHost)
AND NextHop != toIPv6('::')
GROUP BY time, NextHop
- ORDER BY time
- LIMIT 100
+ ORDER BY time) as subquery
+ where row_num <= 100
"""#
"Traffic per Ingress Interface":
#"""
@n0emis is it fine for you if I make a commit with that patch with you as author?
Yes, sure. Go ahead
The query for the Next Hop panel in the overview dashboard has a
LIMIT 100
, but each output row is a data point and not a time series, so it cuts off the panel after the 100 earliest resulting data points.