From 6c05970ba1017c83dca5efbd87dc158577bcbd54 Mon Sep 17 00:00:00 2001 From: Cyril Tovena Date: Fri, 23 Jul 2021 14:21:54 +0200 Subject: [PATCH] Improve the sweep lag panel in the retention dashboard. (#4030) This uses now a graph panel which shows us lags over time. Signed-off-by: Cyril Tovena --- production/loki-mixin/dashboards/loki-retention.libsonnet | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/production/loki-mixin/dashboards/loki-retention.libsonnet b/production/loki-mixin/dashboards/loki-retention.libsonnet index 167afbef0e5e7..0702a5125d9ce 100644 --- a/production/loki-mixin/dashboards/loki-retention.libsonnet +++ b/production/loki-mixin/dashboards/loki-retention.libsonnet @@ -76,7 +76,9 @@ local utils = import 'mixin-utils/utils.libsonnet'; .addRow( $.row('') .addPanel( - $.fromNowPanel('Sweep Lag', 'loki_boltdb_shipper_retention_sweeper_marker_file_processing_current_time') + $.queryPanel(['time() - (loki_boltdb_shipper_retention_sweeper_marker_file_processing_current_time{%s} > 0)' % $.namespaceMatcher()], ['lag']) + { + yaxes: g.yaxes({ format: 's', min: null }), + }, ) .addPanel( $.panel('Marks Files to Process') +